[comp.lang.pascal] Check to see if file exists ????

gaertner@tertius.in-berlin.de (06/05/91)

Hi,

I don't read the orginal question, only the reply.

The easiest way to check (in VAX Pascal) whether the file exists is to use
the STATUS function:

   OPEN(...,FILE_VARIABLE:=file_var,FILE_NAME:=file_name,HISTORY:=OLD,
        ERROR:=CONTINUE,...) ;
   open_stat := STATUS(file_var) ;

Another way is to use the system routine  LIB$FIND_FILE.

Ralf

--

   Ralf Gaertner                   gaertner@venus.rz-berlin.mpg.de
   FHI Berlin