UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

Related Command UniData BASICTYPE – For information, see the UniData Commands Reference. 1-29 UniBasic Commands Reference

$DEFINE Syntax $DEFINE var Description The UniBasic $DEFINE command defines a control variable you can use later to direct compilation. Tip: Keep $DEFINE statements in a separate INCLUDE file to facilitate recompiling programs with different definitions. Example In the following example, SMALL is defined when the program segment is compiled, and UniData defines array1 as a 10-element array initialized with 0: $DEFINE SMALL $IFDEF SMALL DIM array1(10) MAT array1 = 0 $ENDIF Related Commands UniBasic $UNDEFINE, EQU $DEFINE 1-30

$DEFINE<br />

Syntax<br />

$DEFINE var<br />

Description<br />

The <strong>UniBasic</strong> $DEFINE command defines a control variable you can use later to<br />

direct compilation.<br />

Tip: Keep $DEFINE statements in a separate INCLUDE file to facilitate recompiling<br />

programs with different definitions.<br />

Example<br />

In the following example, SMALL is defined when the program segment is<br />

compiled, and UniData defines array1 as a 10-element array initialized with 0:<br />

$DEFINE SMALL<br />

$IFDEF SMALL<br />

DIM array1(10)<br />

MAT array1 = 0<br />

$ENDIF<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

$UNDEFINE, EQU<br />

$DEFINE 1-30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!