FANDOM



This command allows you to create a sequence of data values as part of your program.

Syntax
DATA Data Statements
Parameters
Data Statements

Value
Enter the appropriate value here.

Returns

This command does not return a value.

Description

The values can be integer, real or string values. You may place the data values in any order you wish providing you separate each one with a comma or place new data values in a separate DATA statement. Data values can be read from the DATA statement using the READ command, and the point at which the data is read can be reset using the RESTORE command. You can separate batches of DATA statements using labels in order to segment your data for alternative uses.

Example Code
READ A,B,C

PRINT A

PRINT

PRINT C

WAIT KEY

END

DATA 42,21,10
Community content is available under CC-BY-SA unless otherwise noted.