11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

EQU<br />

Syntax<br />

EQU constant1 TO value1 [[,constant2 TO value2]...]<br />

EQU constant1 {LITERALLY | LIT} string2 [[,constant2 {LITERALLY |<br />

LIT} string2]...]<br />

Synonym<br />

EQUATE<br />

Description<br />

The <strong>UniBasic</strong> EQU command replaces a constant with an array, function, number,<br />

string, or variable name when the program is compiled.<br />

The only difference between the statements using TO and those using LITERALLY<br />

is the use of quotation marks. In the TO form, you cannot enclose literals in quotation<br />

marks. In the LITERALLY form, you must enclose literals in quotation marks.<br />

After the execution of an EQUATE statement, you can use the constant symbols and<br />

variables interchangeably at all levels of the program.<br />

EQUATE variables are available from within the <strong>UniBasic</strong> debugger.<br />

The variable literal string limit is 2,048 characters. EQUATE has the same limit.<br />

Tip: EQUATE enables you to use longer, more meaningful names as you write code.<br />

These names are replaced with the actual value when the program is compiled.<br />

EQUATE also lets you equate a control character to a meaningful name. UniData<br />

does not use memory for a constant symbol because the replacement takes place<br />

during compilation.<br />

1-262 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!