$ERROR compiler directive

$ERROR compiler directive

Top  Previous  Next

 

The $ERROR directive generates a compilation error.

 

 

Format

 

$ERROR message

 

where

 

messageis the error message to be displayed by the compiler.

 

 

The $ERROR directive causes the QMBasic compiler to generate a compilation error. It is most likely to be used inside a $IFDEF conditional compilation structure to recognise that the program is in some way invalid.

 

 

Example

 

$IFNDEF PLATFORM

  $ERROR Platform not defined

$ENDIF

 

The above example generates a compilation error if the PLATFORM token has not been defined.

 

 
See also:

$DEFINE, $IFDEF, $STOP, $WARNING