REM directives

BASin

REM directives

Spectrum BASIC uses the REM statement for comments, which are pieces of text that serve to explain the purpose of the code. REM statements have no effect in a running program.

BASin supports a number of REM directives, which are special commands that can be activated during the running of a program by including the appropriate REM statement.

REM directives are case-insensitive, but there must be no more than one space between REM and the directive.

You cannot use a REM directive in a direct command - only in a program line.

REM fast

Tells BASin to start running the program as fast as possible, disregarding any timing constraints. While not true to the behaviour of a real Spectrum, this feature is useful for skipping through time-consuming operations.

REM slow

Tells BASin to resume normal execution speed.

REM log expression

Tells BASin to evaluate expression (which may be string or numeric) and write the result to the Log window.

This directive supports BASIC keywords and operators as well as simple variables. Here are some examples:

 10 REM log i
 80 REM log "Reached line 80"
100 REM log FN p(j)
500 REM log "Length of b$ is " + STR$ LEN b$

Note: If an error occurs while evaluating an expression, the error message is written to the Log window instead.