47

Syntax Summary
IF (single line version) (see Chapter 5)
Use
This version of the IF statement is used to choose between two courses of
action. It is retained only forcompatibility with earlier versions of BASIC.
Syntax IF testvalue[colons )THEN [instructions)[[colons )ELSE elseinstructions) or IF testvalue[colons )GOTO location[[colons ) ELSE elsemnstructions)
where testvalue is a truth-value
instructions and elseinstructions are either (a) a line number, orb) a sequence of BASIC statements, each separated by colons
colons isa sequence of one or more colons, but not new lines.

IFEND IF (see Chapter 5)
Use
IF...END IF is used to choose between various courses of action depending on
the values of various expressions.
Syntax
IF testvaluel[: )THEN [: )stalementst[:
[ELSEI F testvalue2[: )THEN [: )statements2[: ))
[ELSEIF testvalue3[: )THEN[: )statements3[: ))

[ELSE [: )elsestatements[: ))
END IF
where the testvalues are truth-values, and statementst, statements2,... and elsestatements are
sequences of BASIC 2 Plus statements, separated with colons or new lines in the usual way.

IMPORT (see Chapter 7)
Use
IMPORT is used to specify the routines, constants and variables which are
imported into a program unit from a module.
Syntax
IMPORT [MODULE module-idenfifier[ I formal-list I )
[import-declaration : )...
END IMPORT
where
module-idenfifieris a numeric-identifier,
import-declaration is SUB subidentifier[ I formallist I)
or FUNCTION funcfion-identifier[ I formal-list I)
or DECLARE CONST simple-var-list
or DECLARE formal-var-list
subidentifier is numeric-identifier
function-identifier is identifier
BASIC 2 PIus: User Guide & Quick Reference 47

47