DATA, READ, RESTORE Updated: Nov 14, 2005 DATA literal[,literal[,etc]] Entries in DATA statements are treated literally. That is, "JOHN" is different than JOHN. Suggestion: The first item in a DATA statement might be a count of the remaining items. This count may be READ and used to set the number of additional READs. Obviously, comments in a DATA statement will be treated as data. DEFINT i, j: DEFSTR a$, b$ DATA 3,100,HotBabe,Maj. Hog READ i, j, a$, b$ 'i=3; j=100; a$="HotBabe"; b$="Maj. Hog" READ MyVar Data type is determined only by the variable type used in the READ statement. As a precaution to prevent errors, READ should return NULL for an attempt to READ past the end of DATA statements. "MyVar" above may be an array element, e.g., READ A(i,j) RESTORE [label] The optional [label] must appear in source code before a RESTORE statement using the label -- for this one-pass compiler. You might consider putting DATA statements with labels among them near the beginning of source code -- perhaps in an $INCLUDE file. If RESTORE to a specific line label is not used, then DATA statements can be anywhere in source code. hotdata.bas and hotdata1.bas in HotTrial provide working code examples. + Penthouse (registered) version Copyright 2003-2005 James J Keene PhD Original Publication: Oct 8, 2003