Brian Wichmann wrote:
If you do reset(t, 'myfile ');
it fails due to the trailing space. If one is attempting to use something very close the ISO 7185, then removing the trailing spaces is virtually impossible. Of course, it is easy to do the following:
procedure MyReset(var T: text; F: <some string type>); var i: integer; begin i := 1; while F[i] <> ' ' do i := i + 1; reset(T, F[1..i-1]); end;
Hence I would like to suggest that reset removes trailing spaces, as on my old machine.... (ISO 7185, with very minimal additions).
This is absurd.
- a filesystem may allow spaces in file- and pathnames - reset(t, 'myfile ') instead of reset(t, 'myfile') when the filename is 'myfile' is simply an application error - the procedure MyReset doesn't remove trailing spaces, think of 'my file'
Regards,
Adriaan van Os