File (internal function)
|-1||File not opened.|
|0||Operation performed successfully.|
|10||End of file occurred during input.|
|11||End of file occurred during output.|
|20||Transmission error during input.|
|21||Transmission error during output.|
Comments and Examples
Print File(N) will return -1 when the file N is not opened. File(N) can be used to separate input from output errors in file processing, including communications files.
file(nn,"WINDOW_RECT | USABLE_RECT", MAT num-arrayname)
The above file() reference redimensions num-arrayname to 4 elements and returns X (horizontal), Y (vertical), Width, and Height in pixels of either the window or usable area rectangle.
Using File with FONTSIZE returns a two element array with the height and width of each fixed character position in pixels (used for positioning and sizing controls). For example:
file(N,"FONTSIZE", MAT num-arrayname)
extended syntax examples
returns 4 items in mat x
For additional information about files, see the following: