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?) 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.
The problem disappeared when the source files where fully converted to Unix-style end-of-lines (Line feeds only). A decent text editor like BBEdit will make this change in two clicks.
Tom