OPEN Statement
Load a datafile into an array.
OPEN {BIN|INT|MOT|TEXT}, <FILENAME>, <ARRAYNAME>
Arguments
{BIN|INT|MOT|TEXT}
File type of the file specified in <FILENAME>. Options are
Type |
Description |
Array Type |
BIN |
Binary File |
Integer |
INT |
INTEL HEX File |
Integer |
MOT |
Motorola HEX File |
Integer |
TEXT |
Text File |
String |
filename The name of the file to be loaded including path if required.
arrayname The name of the array where the loaded data will be stored.
Remarks
The array must have been declared before executing this statement. Binary, INTEL and MOTOROLA format files must be loaded into an integer array and TEXT files must be loaded into a string array. The array length will expand to include all the elements in the file. If the array is already larger than the file data size then the array size will not change and the rest of the array will be undefined.
Example
Dim Data[] as integer
OPEN MOT,"C:\Data\eprom.hex",Data