home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!think.com!ames!purdue!yuma!yuma.acns.colostate.edu!hemstree
- From: hemstree@lamar.acns.colostate.edu (Charles Hemstreet)
- Subject: Need to trap File DNE error...
- Sender: news@yuma.ACNS.ColoState.EDU (News Account)
- Message-ID: <HEMSTREE.92Nov12085754@lamar.lamar.acns.colostate.edu>
- Date: Thu, 12 Nov 1992 13:57:54 GMT
- Nntp-Posting-Host: lamar.acns.colostate.edu
- Organization: Colorado State University
- Lines: 33
-
-
- I am using HP Pascal (on an HP9000/370) and writing a program that is
- accessing files. I haven't been able to find the HP Pascal manual so
- here I am...
-
- I am calling a file with reset. If the file Does not exist I would
- like to trap the error and report it in a friendly manner. Is there
- an easy of doing this? I tried using ioresult but I get the message
- "this feature is not enabled -ioresult"
-
- I have...
-
- begin
- reset(intern,filename);
- if ioresult <> 0 then
- begin
- writeln('the file :',filename,' is not available.');
- halt; {is there a better way than halting?}
- end
- else
- writeln('I have opened ",filename,'.');
- end;
-
-
- Thanks for the help,
-
- Charles
-
- --
- !===========================================================================!
- ! Charles H. Hemstreet IV !internet: hemstree@cs.Colostate.Edu !
- ! Colorado State University ! or hemstree@lamar.Colostate.Edu !
- !===========================================================================!
-