RANDOM

From QB64 Wiki
Revision as of 07:58, 28 August 2009 by 72.95.147.221 (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.