The problem is simply that "readln" is split into "read" and "readline_end". The former reads whatever you want to read, the latter consumes the end-of-line. The ioresult is checked after both operations. If the read already returned an error, then an exception will be raised, so the readln_end is never executed.
That's the way readln (and writeln) was implemented from the start in FPC. I don't know if there's an elegant solution possible, or that it requires to change the whole way we handle it (e.g. passing a boolean to each internal read routine that notes whether or not it should consume everything till the end of the current line, no matter what happens).
ok, thanks for clarifying that for me. it shouldn't be too difficult to find a workaround, in fact the code i'm using atm will do quite nicely since if its "triggered" the value is set to 0 and that's certainly something i can test for.
again, thanks ... :D
_______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal