IF

From TVPaintWiki
Revision as of 12:57, 22 December 2009 by KenC (Talk | contribs) (Created page with '{{LangRefCatCrumbs}} IF(condition) (instructions) ELSE (instructions) END Executes a series of instructions if the specified condition is true (if ... then)…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<<<George<<<George Language Reference

  IF(condition)
     (instructions)
  ELSE
     (instructions)
  END

Executes a series of instructions if the specified condition is true (if ... then). You can use the ELSE instruction if you wish to execute another series of instructions if the condition is false. The series of instructions to be executed must terminate with the END instruction.

Example :

// Test of variable a
IF(a == 2)
	PRINT "Variable A is equal to " a
ELSE
	PRINT "Variable A is not equal to 2."
END