Difference between revisions of "RANDOM"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
'''RANDOM''' is used in an [[OPEN]] statement to read([[GET]]) or write([[PUT]]) the file. It creates the file if none exists. | '''RANDOM''' is used in an [[OPEN]] statement to read([[GET]]) or write([[PUT]]) the file. It creates the file if none exists. | ||
+ | |||
''Example:'' OPEN FileName$ FOR RANDOM AS #1 LEN = 456 | ''Example:'' OPEN FileName$ FOR RANDOM AS #1 LEN = 456 | ||
+ | |||
Random files can store records holding various variable types using a [[TYPE]] definition or a [[FIELD]] statement. For example a contact book format with each record holding a person's information. | Random files can store records holding various variable types using a [[TYPE]] definition or a [[FIELD]] statement. For example a contact book format with each record holding a person's information. |
Revision as of 07:59, 28 August 2009
RANDOM is used in an OPEN statement to read(GET) or write(PUT) the file. It creates the file if none exists.
Example: OPEN FileName$ FOR RANDOM AS #1 LEN = 456
Random files can store records holding various variable types using a TYPE definition or a FIELD statement. For example a contact book format with each record holding a person's information.