3.3.4 File types

File types are types that store a sequence of some base type, which can be any type except another le type. It can contain (in principle) an innite number of elements. File types are used commonly to store data on disk. Nothing prevents the programmer, however, from writing a le driver that stores it's data in memory. Here is the type declaration for a le type:

_________________________________________________________________________________________________________ File types
-- --  le type -  le--|------------------------------------------------
                  -of- type--
___________________________________________________________________

If no type identier is given, then the le is an untyped le; it can be considered as equivalent to a le of bytes. Untyped les require special commands to act on them (see Blockread (??), Blockwrite (??)). The following declaration declares a le of records:

Type  
   Point = Record  
     X,Y,Z : real;  
     end;  
   PointFile = File of Point;

Internally, les are represented by the FileRec record, which is declared in the DOS unit.

A special le type is the Text le type, represented by the TextRec record. A le of type Text uses special input-output routines.