Syntax |
FileAttr(filenumber, attribute) |
||
Description |
Returns an Integer specifying the file mode (if attribute is 1) or the operating system file handle (if attribute is 2). |
||
Comments |
The FileAttr function takes the following parameters: |
||
|
Parameter |
Description |
|
|
Filenumber |
Integer value used by Basic Control Engine to refer to the open file; the number passed to the Open statement. |
|
|
Attribute |
Integer specifying the type of value to be returned. If attribute is 1, then one of the following values is returned: |
|
|
|
1 |
Input |
|
|
2 |
Output |
|
|
4 |
Random |
|
|
8 |
Append |
|
|
32 |
Binary |
|
|
If attribute is 2, then the operating system file handle is returned. On most systems, this is a special Integer value identifying the file. |
|
Example |
This example opens a file for input, reads the file attributes, and determines the file mode for which it was opened. The result is displayed in a dialog box. Sub Main() |
||
See Also |
FileLen (function); GetAttr (function); FileExists (function); Open (statement); SetAttr (statement). |
F |