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

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

[...]
> > This is a historical factor, and there was no need to duplicate
> > features that Borland already documented well, and which were well
> > known to Borland Pascal/Delphi programmers.
> 
> I am not sure they are so well known since you did not explain to me
> why (i.e. by which miracle) a program that stops abruptly (when
> compiled with $I-), stops normally if you add a call to ioResult
> *after* the io statement that makes the original program fail. I doubt
> very much that this could be explained in the original Borland
> documentation and also that this behavior should be well known of
> Borland Pascal programmers.

As I said, the Borland Pascal/Delphi help files are freely available 
on the net. If you want to use Borland Pascal/Delphi compatibility 
features in GPC, you would do well to study the Borland documentation 
on those features.

This is from a 20 year old Borland Turbo Pascal help file:

[--- excerpt begins ---]
$I:  Input/Output-Checking Switch
Enables or disables the automatic code generation that checks the 
result of a call to an I/O procedure 

Syntax:	$I+ or $I-
Default:	$I+
Type:	Local
Command-Line:	/$I+ or /$I-
Menu Command:	Options|Compiler|I/O Checking

Remarks
If an I/O procedure returns a non-zero I/O result when the $I switch 
is on, the program terminates, displaying a run-time error message.  

When the $I switch is off, you must use the IOResult function to 
check for I/O errors. 
[--- excerpt ends ---]

Please let us stop this meaningless debate now. You would be far 
better off studying the Borland documentation. Should you think that 
this documentation really needs to be reproduced in the GPC 
documentation, please feel free to contribute the required 
documentation.

Best regards,  
 The Chief
-------
Prof. Abimbola 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.