-
Declaration:
- Procedure Blockread (Var F : File; Var Buffer; Var Count : Longint [; var
Result : Longint]);
-
Description:
- Blockread reads count or less records from file F. A record is a block of bytes with size
specified by the Rewrite (559) or Reset (558) statement.
The result is placed in Buffer, which must contain enough room for Count records. The
function cannot read partial records. If Result is specified, it contains the number of records
actually read. If Result isn’t specified, and less than Count records were read, a run-time
error is generated. This behavior can be controlled by the {$i} switch.
-
Errors:
- Depending on the state of the {$I} switch, a runtime error can be generated if there is an
error. In the {$I-} state, use IOResult to check for errors.
-
See also:
- Blockwrite (460), Close (465), Reset (558), Assign (455)
Listing: refex/ex6.pp