If:




Syntax:

If logical expression then

Program body

endif

or

If logical expression then

Program body1

else

Program body2

endif

The top If command will only run Program body if the logical expression is true,
the other If command will run Program body1 if the logical expression is true
else it will run Program body 2, see grammar for logical expression.
The if command ends with a endif.

Grammar




Program Example:

show "Enter a number:" at 12,24;
get i% at 12,40
if i%<0 then
show "The number is Negative." at 1,1
endif;
{This will show if the number is negative.}

if i%>50 then
show "The number is greater than 50." at 2,1
else
show "The number is less than 50." at 2,1
endif
{This will show if the number is above or belowe 50}

Program File

Application File




Return

Last Updated: July 1998.