Re: Understanding {$I-} {$I+} ioResult
Baudouin Le Charlier <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Le 25 nov. 2012 à 15:13, Prof A Olowofoyeku (The African Chief) a écrit :
> 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.
Well, in fact, it does not stop it : (compiled with {$I-})
$ gp lireToto.pas
$ ./lireToto
c = a ; ord(c) = 97
i = -12
s = lulu
x = 1.345000000000000e+00
c = ; ord(c) = 32
x = 1.000000000000000e+00
s = a
./lireToto: attempt to read past end of file `toto.txt' (error #454 at 1f53)
Trace/BPT trap
$ more toto.txt
a
-12lulu
1.345 45
1a
$
Baudouin Le Charlier
_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
lireToto.pas
(application/octet-stream, 4.5 KB) - not displayed