QBasic 1.1: FILEATTR Function

Syntax

FILEATTR(filenumber%,attribute%)

Description / Parameter(s)

filenumber% The number of an open file.
attribute% Specifies the type of information to return. When attribute% is 1, FILEATTR returns a value indicating the file's access mode:
 
ValueMode
1Input
2Output
4Random
8Append
32Binary
  When attribute% is 2, FILEATTR returns the DOS file handle.

Example

OPEN "TEST.DAT" FOR BINARY AS #1 PRINT FILEATTR(1, 1) CLOSE