According to Jesper Lund:
You need to close the file before calling reset. If you add
close(f)
just before
reset(f)
your program works fine. Whether this is a *feature* or a *bug* depends on the definitions of reset/rewrite in the (various) Pascal standard(s). [...]
I agree. However when we want to claim some compatibility to Borland Pascal, GPC must also support this feature/bug. So I must consider this failure a bug in GPC. Thanks, Christian, for finding it out! :-)
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]