home *** CD-ROM | disk | FTP | other *** search
- \ Answer for problem 3.10 by Dickson Cheng 04/04/90 21:30:34.56
-
- \ If the interval testing words are used with invalid internals
- \ the flag will always be false.
-
-
- \ (IN) leaves a true flag if a < x < b , otherwise false.
- : (IN) ( x a b -- flag )
- OVER 1 PICK > IF SWAP THEN
- -ROT OVER < -ROT > AND ;
-
- \ [IN] leaves a true flag if a <= x <= b , otherwise false.
- : [IN] ( x a b -- flag )
- 1+ SWAP 1- SWAP (IN) ;
-
- \ (IN] leaves a true flag if a < x <= b , otherwise false.
- : (IN] ( x a b -- flag )
- 1+ (IN) ;
-
- \ [IN) leaves a true flag if a <= x < b , otherwise false.
- : [IN) ( x a b -- flag )
- SWAP 1- SWAP (IN) ;
-
-