home *** CD-ROM | disk | FTP | other *** search
- \ Balraj Sidhu Set: 14D4
- \ Comp 462 - Forth
- \ Date: April 6, 1990
- \ Problem 3.6
-
- \ Illustration of Number Bases and formatted display operators
-
- : ntable ( dn -- )
- cr ." Unsigned" ." Signed" ." Unsigned"
- ." Signed" ." Unsigned" ." Signed"
- cr ." Decimal" ." Decimal" ." Octal "
- ." Octal " ." Hex " ." Hex "
- 20 0 do
- cr
- decimal dup 13 u.r
- dup 13 .r
- octal dup 13 u.r
- dup 13 .r
- hex dup 13 u.r
- dup 13 .r
- 1 +
- loop
- drop decimal ;
-
-
-