07.05.2015 Views

Bronze Edition Guide - True BASIC

Bronze Edition Guide - True BASIC

Bronze Edition Guide - True BASIC

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.

154 BRONZE <strong>Edition</strong> <strong>Guide</strong><br />

DEF Structure<br />

DEF identifier (parm1, ..., parm n)<br />

...<br />

EXIT DEF [optional]<br />

...<br />

END DEF<br />

The DEF structure input order allows the programmer to define new multi-line functions.<br />

The DEF structure may contain one or more EXIT DEF statements.<br />

The function is invoked by including its name, with suitable arguments, in an expression.<br />

The arguments must match the parameters in the DEF structure in number, position, type,<br />

and number of dimensions. Parameter passing is by value; that is any changes to the<br />

parameters will not cause changes to the corresponding arguments.<br />

The defined function can also contain DECLARE DEF and LOCAL statements.<br />

DIM Statement<br />

DIM array (bounds), ..., array (bounds)<br />

Except for function or subroutine parameters, each array in a program-unit must be dimensioned<br />

in a DIM or LOCAL statement that occurs lexically before the first reference to that<br />

array.<br />

DO Loop<br />

DO { | WHILE condition | UNTIL condition | }<br />

. . .<br />

EXIT DO [optional]<br />

. . .<br />

LOOP { WHILE condition | UNTIL condition | }<br />

The DO statement can contain either a WHILE or UNTIL part, or nothing, and the same<br />

for the LOOP statement. There can be any number of EXIT DO statements.<br />

DRAW Statement<br />

DRAW picture name (arg 1, ..., arg n)<br />

DRAW picture name (arg 1, ..., arg n) WITH trans *... * trans<br />

trans:: SCALE (size)<br />

SCALE (xsize, ysize)<br />

ROTATE (angle)<br />

SHIFT (xshift, yshift)<br />

SHEAR (angle)<br />

The (argument-list) is optional. The DRAW statement causes the picture named to be drawn

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

Saved successfully!

Ooh no, something went wrong!