


      OOOOppppeeeennnnFFFFiiiilllleeee((((3333BBBB))))                 ((((RRRRiiiiddddggggeeee))))                 OOOOppppeeeennnnFFFFiiiilllleeee((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           OpenFile - open a stream file

      SSSSYYYYNNNNTTTTAAAAXXXX
           PROCEDURE OpenFile (var f : Text;
                                   name : String;
                                   mode : Char);

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _O_p_e_n_F_i_l_e is used to associate a stream file with the
           variable ffff, which can then be used in standard Pascal
           input/output operations or can be a parameter to other
           stream file routines.  The string nnnnaaaammmmeeee specifies the
           pathname of the file.  The character mmmmooooddddeeee can be one of four
           different letters (upper or lower case) that indicate how
           the file should be opened, as described below.

           The value rrrr indicates the file should be opened for reading
           only, and therefore must exist.

           The value wwww indicates the file should be opened for writing
           only, and is either created if it did not exist, or
           truncated to zero length if it did exist.

           The value aaaa indicates the file should be appended to, which
           is similar to writing only. The file is created if it did
           not exist. If the file exists, it is not truncated and the
           read/write cursor is positioned at the end of file.

           The value uuuu indicates that the file should be opened for
           update, which permits both reading and writing. The file is
           created if it did not exist, and the read/write cursor is
           positioned at the beginning of the file.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           CloseFile (3B), Create (3B), FileStatus (3B), Open (3B)

      NNNNOOOOTTTTEEEESSSS
           The FileStatus routine should be used to determine if a
           stream file was opened successfully.  A stream file may not
           be opened correctly if the file name is not valid, does not
           exist or cannot be accessed according to the mode, or if too
           many open files already exist.












      Page 1                                                   (9010-E)



