Class FileStatementAccess
Which file statements a channel opened under a given mode and access may be used by (MS-VBAL §5.4.5.1's own table).
public static class FileStatementAccess
- Inheritance
-
FileStatementAccess
- Inherited Members
Remarks
The specification states this as one table covering every file statement, so it is encoded once here
rather than restated by each of them — a statement asks whether it is allowed on a channel and reports
Bad file mode when it is not. Getting it wrong in twelve places independently is the alternative.
👉 A blank cell in that table means the statement is not valid in that mode at all, whatever the access; a cell listing accesses means valid only under those.
Methods
ImpliedAccess(VBFileMode)
The access an Open with no Access clause implies, from its mode
(MS-VBAL §5.4.5.1's other table).
public static VBFileAccessMode ImpliedAccess(VBFileMode mode)
Parameters
modeVBFileModeThe mode the
Opendeclared, or defaulted to Random.
Returns
IsValid(string, VBFileMode, VBFileAccessMode)
Whether statement may be used on a channel opened under mode
and access.
public static bool IsValid(string statement, VBFileMode mode, VBFileAccessMode access)
Parameters
statementstringThe statement's keyword — a Tokens constant, including the two-keyword LineInput.
modeVBFileModeThe mode the channel was opened under.
accessVBFileAccessModeThe access the channel was opened under.
Returns
Remarks
A statement this table says nothing about is not restricted by it — Close and Reset are
valid on any channel, and the table does not list them.