home *** CD-ROM | disk | FTP | other *** search
- \ Balraj Sidhu Set: 14D4
- \ Comp 462 - Forth
- \ Date: April 7, 1990
- \ Problem 3.9
-
- \ The following will leave a true flag (-1) on the stack
-
- cr
- 5 5 .s = . cr
- 8 3 .s <> . cr
- 2 9 .s < . cr
- 9 2 .s > . cr
- 0 .s 0= . cr
- 3 .s 0<> . cr
- -5 .s 0< . cr
- 5 .s 0> . cr
- -1 -1 .s and . cr
- -1 0 .s or . cr
- 0 .s not . cr
-
- beep
- key drop
-
- \ The following will leave a false flag (0) on the stack
-
- cr
- 5 6 .s = . cr
- 8 8 .s <> . cr
- 9 2 .s < . cr
- 2 9 .s > . cr
- 1 .s 0= . cr
- 0 .s 0<> . cr
- 5 .s 0< . cr
- -5 .s 0> . cr
- 5 2 .s and . cr
- 0 0 .s or . cr
- -1 .s not . cr
-
-
-