home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / source / p3_9bs.seq < prev    next >
Encoding:
Text File  |  1990-04-07  |  658 b   |  40 lines

  1. \ Balraj Sidhu   Set: 14D4
  2. \ Comp 462 - Forth
  3. \ Date: April 7, 1990
  4. \ Problem 3.9
  5.  
  6. \ The following will leave a true flag (-1) on the stack
  7.  
  8. cr
  9.  5  5 .s   = . cr
  10.  8  3 .s  <> . cr
  11.  2  9 .s   < . cr
  12.  9  2 .s   > . cr
  13.  0    .s  0= . cr
  14.  3    .s 0<> . cr
  15. -5    .s  0< . cr
  16.  5    .s  0> . cr
  17. -1 -1 .s and . cr
  18. -1  0 .s  or . cr
  19.  0    .s not . cr
  20.  
  21. beep
  22. key drop
  23.  
  24. \ The following will leave a false flag (0) on the stack
  25.  
  26. cr
  27.  5  6 .s   = . cr
  28.  8  8 .s  <> . cr
  29.  9  2 .s   < . cr
  30.  2  9 .s   > . cr
  31.  1    .s  0= . cr
  32.  0    .s 0<> . cr
  33.  5    .s  0< . cr
  34. -5    .s  0> . cr
  35.  5  2 .s and . cr
  36.  0  0 .s  or . cr
  37. -1    .s not . cr
  38.  
  39.  
  40.