Trapping I/O runtime errors in GPC
The African Chief
laa12 at keele.ac.uk
Tue Oct 28 09:42:52 CET 1997
Bill Currie wrote:
>
> On 27 Oct 97 at 8:50, Frank Heckenbach wrote:
>
[...]
> > - After calling an I/O function, if {$I+} is turned on, the calling
> > program
> > must check InOutRes. The code to be generated (perhaps you've
> > already done so) would look like "if InOutRes<>0 then _p_ioerror;"
> > where _p_ioerror will be a RTS function I can provide. (The check
> > "if InOutRes<>0" could also be done in the function (like in BP!),
> > but that's inefficient, because the function has to be called
> > after each I/O operation then.)
>
> Actually, that's almost exactly what my mods do. If IO checking is
> enabled ( {$I+} ), a proceedure taking no parameters is called that
> would check the InOutRes state (though I used a different name) and
> if it's set dumps a dirty message and aborts the program.
For compatibility with BP, you would need to call the variable
"InOutRes", and it should be exported, so that programmers can
set it manually if they want (this feature of BP might be
considered to be a bug by some, but I have found great use for it
...).
Best regards, The Chief
--------
Dr. Abimbola A. Olowofoyeku (The African Chief)
Email: laa12 at keele.ac.uk
Author of: Chief's Installer Pro 4.01 for Win16 and Win32:
Winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition)
http://ourworld.compuserve.com/homepages/African_Chief/
ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/chief/pro/chief401.zip
More information about the Gpc
mailing list