From QB64 Wiki
Revision as of 07:59, 28 August 2009 by (talk)
Jump to navigation Jump to search

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.