17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

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.

GW-BASIC <strong>User's</strong> Guide<br />

OPTION BASE Statement<br />

Purpose:<br />

To declare the minimum value for array subscripts.<br />

Syntax:<br />

OPTION BASE n<br />

Comments:<br />

n is 1 or 0. The default base is 0.<br />

If the statement OPTION BASE 1 is executed, the lowest value an array subscript can have is 1.<br />

An array subscript may never have a negative value.<br />

OPTION BASE gives an error only if you change the base value. This allows chained programs to<br />

have OPTION BASE statements as long as the value is not changed from the initial setting.<br />

Note<br />

You must code the OPTION BASE statement before you can define or use any arrays. If an<br />

attempt is made to change the option base value after any arrays are in use, an error results.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/OPTIONBASE.html28/03/2004 21.29.01

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

Saved successfully!

Ooh no, something went wrong!