SAVE DATA

BASin

SAVE DATA

Statement/Command

SAVE DATA stores an array variable in a file. The array can then be loaded using LOAD DATA.

How to use SAVE DATA

SAVE DATA may be used to form a statement in a program or as a direct command. SAVE is followed by a filename, then DATA, a letter or letter with $, and finally a pair of empty brackets, for example

450 SAVE "numbers" DATA n()

750 SAVE "names" DATA n$()

The array's filename may contain up to ten characters. The letter or letter$ following DATA us the name of the array in the program that is to be stored in a file. The array is then sent to the file in the same was as a program is using SAVE.

Format

  • SAVE string-expr DATA letter[$]()

See also

Chapter 20.