Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!wugate!uunet!mcsun!inria!seti!jourdan From: jourdan@seti.inria.fr (jourdan martin joseph) Newsgroups: comp.lang.pascal Subject: Re: File existence and Pascal in Sun 4 Message-ID: <250@seti.inria.fr> Date: 22 Aug 89 14:48:03 GMT References: <708@chyde.uwasa.fi> Reply-To: jourdan@seti.UUCP (jourdan martin joseph) Organization: INRIA Rocquencourt, Le Chesnay, France Lines: 18 In article <708@chyde.uwasa.fi> ts@chyde.uwasa.fi (Timo Salmi LASK) writes: >... considering Sun >4 pc-compiler pascal. To start with, is there a function for >finding out whether a file exists, like using IOResult in Turbo >Pascal. If not, any other reasonable way without resorting to >systems access (or whatever) or C-programming. As far as I know (at least I am pretty sure of what I say for Sun-3's and Ultrix, so I don't see why this would be different on Sun-4's), you *have* to resort to features outside of Pascal to test file existence. To reduce your grief, all I can say is that it is very easy to call from Pascal the routines in the C library, including "access" which would fit your needs. If you're interested I can post a few lines of code doing the job. -- Martin Jourdan, INRIA, Rocquencourt, France. My employers have no opinion and they guarantee my freedom of expression.