Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <b>data store constant(s) for retrieval via read</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DATA                     Store Constant(s) for Retrieval via READ

 DATA constant1 [,constant2]...

    Stores one or more constants, of any type, for subsequent access via
    READ statements.

   -------------------------------------------------------------------------

      Notes:    DATA statements are nonexecutable statements that supply a
                stream of data constants for use by READ statements. All
                the items supplied by all the DATA statements in a program
                make up one continuous string of information that is
                accessed in order by your program's READ statements. Use
                RESTORE to reset the pointer to the first item in a
                specified DATA statement.

                You may put as many constants (expressions are not
                allowed) in a single DATA statement as will fit on one
                line, and your program may have any number of DATA
                statements, positioned anywhere in the program.

                String constants in DATA statements do not need to be
                surrounded by quote marks, unless they contain quote marks
                themselves, colons, commas, or significant leading or
                trailing blanks.

                Numeric constants can be integer or floating point. They
                can be written in decimal, hexadecimal, or octal notation.

                If you wish to add a comment at the right side of a DATA
                statement, use :REM. An apostrophe (single quote) will be
                treated as part of a DATA item.

                If you try to READ more data than the amount supplied,
                runtime error 4 (Out of Data) occurs.

See Also: READ RESTORE

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson