ts@chyde.uwasa.fi (Timo Salmi LASK) (08/20/89)
I have written a fair number of Turbo Pascal programs, but much fewer on standard pascal. I wonder if someone would save me the trouble of finding out some elementary things myself 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. This to start with. I shall probably have some more questions later. Email is welcome, but a in my opinion messages here in the news are preferable, because that way knowledge disseminates better. (And that is what this system is all about, if you pardon my meta-comment.) ................................................................... Prof. Timo Salmi (Site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun
jourdan@seti.inria.fr (jourdan martin joseph) (08/22/89)
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 <jourdan@minos.inria.fr>, INRIA, Rocquencourt, France. My employers have no opinion and they guarantee my freedom of expression.