DATA, READ, RESTORE
Updated: Apr 16, 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.

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.

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.

data.bas and hotdata.bas provide working code examples.


+ Penthouse (registered) version

Copyright 2003-2005 James J Keene PhD
Original Publication: Oct 8, 2003
