Statement separation

The colon character (:) can be used to separate multiple statements on a single (logical) line of source code.  For example:

FOR x& = 1 TO 10 : INCR y& : NEXT x&

…is directly equivalent to:

FOR x& = 1 TO 10

  INCR y&

NEXT x&

In general, placing only one statement per line leads to more readable and maintainable source code; however, using the colon separator can be useful for combining statements on single-line IF/THEN statements, etc.  For example

IF x! < 0 THEN INCR y# : INCR z# : DECR Count& : GOTO LastX

 

See Also

Line numbers and Labels

Long lines

Structured Programming

Variables