|
ReadFile | ||
ReadFile Filename$, ChannelIndex | ||
Parameters: Filename$ = The name of the file you wish to read data from ChannelIndex = Indes of the file channel to use |
||
Returns: NONE | ||
ReadFile opens a file for read access. The command requires both the filename to open for reading, and a file channel index for use with subsequent reading commands (ie ReadByte, ReadWord, ReadInt etc etc. Files can be accessed both sequentially and randomly. However, files can NOT be written to when opened with ReadFile Sequential Access Sequential file access, is when you step through the file in order, in other words, you begin reading at the start of the file, and continue reading through it from start to finish. Never stepping backward or skipping forward. Random Access Random file access, is where you jump around through the file reading one section, then perhaps jumping back or skipping forward. So your randomly accessing parts of file at will. This is often invaluable when you need to read data sections found in image files, or constructing your own pack file format. FACTS: * Files Opened with READFILE can not be written to. Mini Tutorial: This example creates a simple file with some various bits of data store in it, then read it's back again.
This example would output.
|
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |