|
Next: VAR Up: COD Command Summary Previous: TSig
UNTILTerminate a BEGIN...UNTIL block. UNTIL pops one number off the stack. If that number is false (=0.0), the function jumps back to the first statement following the BEGIN statement. Otherwise execution continues with the statement following the UNTIL statement. This word can only be used in colon definitions.
Example: COD> VAR Y ! Create variable Y COD> : TEST 2 Y STO ! Initialize Y to 2 COD> BEGIN COD> Y RCL . ! Print the value of Y COD> Y RCL DUP * Y STO ! Square it and store new value COD> Y RCL 1.E10 > ! Test condition COD> UNTIL ; COD> TEST 2.0 4.0 16.O 256.0 4.2949673E+9
Web Page Maintained by: Dr. Lawrence E. Brown elwin@redshift.gsfc.nasa.gov |