Re: Understanding {$I-} {$I+} ioResult

"Prof A Olowofoyeku (The African Chief)" <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Organization ChiefSoft
Message-ID <[email protected]>
On 25 Nov 2012 at 12:13, Baudouin Le Charlier wrote:

> It seems that {$I-} is not enough to disable the automatic handling
> of IO errors. 

I doesn't disable error checking. It just stops it from automatically 
terminating the program immediately it encounters an I/O error. But you 
must check IOResult, to see whether there is an error, and so handle 
the error yourself (or ignore the error), but, crucially, to clear the 
error flag.

> You also have to actually write a call to ioResult in the program.
> Seems to me that this is not a correct behaviour. 

It is the correct behaviour. What is the point of preventing I/O errors 
from terminating the program if you will not check to see whether there 
has been an error? Just allow the program to keep running and keep 
generating errors that no-one is interested in checking? 

Best regards, The Chief
--------
Prof. Abimbola A. Olowofoyeku (The African Chief) 
web:  http://www.greatchief.plus.com/


_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.