Data – Remote Processing CAMBASIC User Manual

Page 60

Advertising
background image

Comm ands - 27

DATA

Statement

SYNTAX:

DATA constant [,constant] . . . .

PURPOSE:

To provide a means to store numeric and string constants and object code programs. The data may
be accesse d by the RE AD sta tement.

REMARK S:

D A T A s ta t em e n ts a re s ki pp e d o v er d u ri ng e xe c ut io n an d m ay b e p la c ed a ny w h er e in th e pr o g ra m .

A DATA statement may contain as many constants as will fit on a line, and any number of DATA
statements may be used in a program. The information contained in the DATA statements may be
thought of as one continuous list of items, regardless of how m any items are on a line or where the
lines are placed in the program. The REA D statements access DATA statements in line number
order.

Each constant may be a numer ic or string constant. No expressions are allowed in the list. The
numeric constants may be decimal or hex. String constants in DATA statements need to be
surround ed by quotation mar ks.

You can use the RESTORE statement to reread information from the beginning of the list of DATA
statemen ts. See the REST ORE statement.

RELATED:

READ, RE STORE

EXAMPLE:

See the RE AD sta tement.

ERROR:

none

Advertising