END_IF

END_IF

ENDS THE STATEMENT OR THE BLOCK OF STATEMENTS TO BE EXECUTED FROM THE COMMAND "IF"

  • Type: Command
  • Parameter: 0
  • Group: Structures

ACTION

The command is a part of the command IF, and is used to define the end of the statement or the block of statements to be executed depending on the result of the logical evaluation of the condition.

The "condition" is a single logical expression (built with comparators >, <, >=, <>, =, ...) or a complex expression combined with logical operators AND, OR, NOT and parenthesis. Only the result (True or False) is used to execute or not the statements after "IF".

SYNTAX: END_IF

  • in:
  • IF C
  • command(s)
  • END_IF
  • C: logical expression.

USE

  • END_IF is used to mark the end of a structure initiated by an IF.

ERROR

  • If C is not a correct logical expression.
  • If there is no IF before END_IF.

EXAMPLE

dim a,b

a=1:b=2

if b>a

print "b is greater than a"

end_if

SEE ALSO

IF

THEN

ELSE

WHILE

END_WHILE

REPEAT

UNTIL

AND

OR

NOT