According to Kevin A. Foss:
Actually it works without patching the source because you are doing non-continuous reads -e.g. using seekread() before each read().
Okay, so what about this one:
Program Test ( Output );
Var Data: File [ 0..25 ] of Char; C: Char;
begin rewrite ( Data ); for C:= 'A' to 'Z' do write ( Data, C ); reset ( Data ); SeekRead ( Data, ord ( 'O' ) - ord ( 'A' ) ); read ( Data, C ); write ( C ); SeekRead ( Data, ord ( 'K' ) - ord ( 'A' ) - 1 ); read ( Data, C ); read ( Data, C ); writeln ( C ); end.
It produces "OK" with the patch; "OJ" without.
Greetings,
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]