Re: Bus error when writing in a typed file
Maurice Lombardi <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Le 18/11/2012 16:40, Baudouin Le Charlier a écrit :
> The following program is completely equivalent to the previous one but it executes without errors.
> (Thanks Chief !)
>
> Baudouin Le Charlier
Yes, but this is a workaround, not a solution.
The two syntaxes are equally valid in pascal.
If I add the instructions
writeln(SizeOf(p));
writeln(SizeOf(f^));
between rewrite(f);
and write(f,p)
noBugError answers
772 772
the result expected if the two variants are consecutive
BusError answers only
772
and launches the error.
A little experimenting with commenting instructions out shows that the
instruction
writeln(SizeOf(f^));
alone is enough to launch the interrupt
Maurice
--
Maurice Lombardi
Laboratoire Interdisciplinaire de Physique,
(ex Spectrometrie Physique)
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 63 54 95
mailto:[email protected]
_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc