IFTRUE

Synopsis
IFTRUE instructionlist
IFT instructionlist
Description

Runs instructionlist if the most recent TEST instruction had a TRUE input. Does nothing, otherwise. The TEST must have been in the same procedure or a superprocedure.

Example
TO MYTEST :arg
  TEST 1 = :arg
  PRINT [Do this]
  PRINT [Do that]
  IFTRUE [PRINT [arg was the number one]]
  IFFALSE [PRINT [arg was NOT the number one]]
END

MYTEST 1
Do this
Do that
arg was the number one

SourceForge.net Logo