


      OOOOppppeeeennnn((((3333BBBB))))                     ((((RRRRiiiiddddggggeeee))))                     OOOOppppeeeennnn((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           Open - open a file

      SSSSYYYYNNNNTTTTAAAAXXXX
           FUNCTION Open (name : String;
                          mode : Integer;
                      var handle : Link;
                      var flag : Integer;
                      var fileSize : Integer) : Error;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _O_p_e_n tries to open an existing file, where the string nnnnaaaammmmeeee
           represents the pathname of the file. The file will be opened
           for reading (mmmmooooddddeeee is 0), writing (mmmmooooddddeeee is 1), or both
           reading and writing (mmmmooooddddeeee is 2).

           If the file is opened successfully, hhhhaaaannnnddddlllleeee will contain a
           link which is used for subsequent input/output operations on
           the file.  The file will be positioned at its beginning.

           A value is returned in ffffllllaaaagggg that indicates whether the file
           should be accessed using block mode only (0), character mode
           only (1), or either mode (2).

           The value returned in ffffiiiilllleeeeSSSSiiiizzzzeeee is the number of bytes in the
           file.  The size of a file that represents a device driver
           may not be determinable when the file is first accessed, and
           will be zero in this case.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           Close (3B), Create (3B)

      NNNNOOOOTTTTEEEESSSS
           ErBadFileName is returned if the name is too long, or
           contains invalid characters.

           ErOpenMode is returned if mmmmooooddddeeee is not 0, 1, or 2.

           ErFileNotFound is returned if the file can not be found.
















      Page 1                                                   (9010-E)



