home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p3_11dc.seq
< prev
next >
Wrap
Text File
|
1990-04-04
|
790b
|
29 lines
\ Problem 3.11 by Dickson Cheng 04/04/90 21:30:34.56
\ (IN) leaves a true flag if a < x < b , otherwise false.
: (IN) ( x a b -- flag )
OVER 1 PICK > IF DROP THEN
-ROT OVER < -ROT > AND ;
\ [IN] leaves a true flag if a <= x <= b , otherwise false.
: [IN] ( x a b -- flag )
OVER 1 PICK > IF SWAP THEN
1+ SWAP 1- SWAP
-ROT OVER < -ROT > AND ;
\ (IN] leaves a true flag if a < x <= b , otherwise false.
: (IN] ( x a b -- flag )
OVER 1 PICK > IF DROP THEN
1+
-ROT OVER < -ROT > AND ;
\ [IN) leaves a true flag if a <= x < b , otherwise false.
: [IN) ( x a b -- flag )
OVER 1 PICK > IF DROP THEN
SWAP 1- SWAP
-ROT OVER < -ROT > AND ;