simlogo1

 

 

 

SimQuest 6.4 help

 

 

If

 

If determines whether or not some condition is true and then returns one of two values accordingly.
It has four variables: condition, thenValue, elseValue and result.
The condition variable has the value true or false.

 

Structure:

       if condition is true then result becomes thenValue otherwise result becomes elseValue

 

Example:

       if false then 'a' else 'b' = 'b'

       if true then 1 else 2 = 1

       if true then (1, 1) else (2, 2) = (1, 1)

 

 

 

Related topics:

 

 

 

Copyright University of Twente 2011