On 11 Dec 99, at 13:31, David James wrote:
I'm still not sure what my example should do. Looking at the copy of Extended Pascal ISO/TEC 10206:1990(E) that I found on (I think) a DEC site somewhere, I *think* it is saying (in section 6.7.5.2) that after the call to 'extend' the file should be in 'Generation' mode.
Right. There is no precondition for "extend" that the file be closed. In fact, there is no "close" predefined function in EP.
I think the run-time error on the 'writeln' is incorrect.
The error is not on the "writeln", it's on the "extend" call (putting a couple of writelns to the screen around the "extend" call will show where the program aborts). At least is is with the 990118 NT version.
...(it's not clear to me whether calling 'extend' on a file that has already been 'reset' is allowed).
I make no claim to expertise with the EP standard, and the prose in the standard is nearly impenetrable :-), but as far as I can see, "extend" following a "reset" is perfectly OK.
-- Dave