Tom Verhoeff wrote:
Frank D. Engel, Jr. wrote:
The strange thing is that sometimes the problem can be fixed by sticking extra WRITELNs in between various lines of code. So for example, if I am having trouble and think the following code is at fault:
x := SomeFunction(y, z); DoSomethingTo(x);
I might change it to:
WRITELN('1'); x := SomeFunction(y, z); WRITELN('2'); DoSomethingTo(x); WRITELN('3');
and sometimes this fixes the problem (but of course, I don't want that extra output...)
Any ideas/fixes/patches?
My father had this same problem. I seems that the compiler misbehaves (buffer-length/line-length interaction problem?)
Unlikely, GPC does not buffer lines.
when the source text itself contains Mac-style end-of-lines (carriage returns only). Possibly the problem only occurs when the source file contains MIXED Mac-style and Unix-style end-of-lines. This can happen when you switch editor, or when you modify a program taken from elsewhere.
I have not investigated it deeply.
Can you send an example? (When I just put mixed line endings into some Pascal source, it didn't happen, of course.)
I still suspect it's a volatile bug (in GPC or the Pascal code).
Frank