Navigation: Contents   Index   Previous   Next

if statements

There are two forms of if statement: if...then..end if and the if...then...else..end if. Like normal basic, if the if expression is true, the statements are executed. If there is else part and expression is false, statements after else are executed.

Examples:

IF J <> 0 THEN Result = I/J END IF

IF J = 0 THEN Exit ELSE Result := I/J END IF

IF J <> 0 THEN

  Result = I/J

  Count = Count + 1

ELSE

  Done = True

END IF

Navigation: Contents   Index   Previous   Next



Copyright © 1998 - 2012 Paessler AG