Apparent bug.
Fri, 24 Jan 1997 13:30:12 -0600
I believe this is a bug. I believe that this should not compile with a
warning.
program testfile (input, output);
var
test: file of integer;
i: integer;
begin
rewrite (testfile);
for i := 1 to 10 do
write (testfile, i);
close (testfile);
end.
Compiled with:
gpc -Wall -ansi -pedantic --standard-pascal -o testfile testfile.p
If there are any typos, it is because I rekeyed the program. They would not
actually exist in the program. The compiler tells me that ISO Pascal does not
allow a file name parameter to reset/rewrite. I do not believe I am passing
one to rewrite. I believe the warning refers to the barbarous practice of
some compilers of requiring:
rewrite (testfile, 'Test');
My mistake. Those testfiles in the program proper should be test. The program
name is testfile.
Please let me know if I am in error or when the bug will be fixed. (I'm not
yet on the mailing list, so please forward a message directly to me.)
Thank you.
Stephen Lindholm (lindholm@snert.wash.cedar-rapids.k12.ia.us)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es