Prof A Olowofoyeku (The African Chief) wrote:
The fault is random. If I insert a space after the "." of the last "end." statement, there is no error. If I remove the space so that the dot is the last thing in the file, the error comes back. If I remove all the comments at the top of the file, the error goes away. If I add the comments back, the error comes back. In each case, BufPos = BufCount + 1. Perhaps you just need to allow for the extra byte.
It was indeed an uninitialized-state bug which was triggered (but not caused) by the use of CR/LF -- a rather complicated situation. Thanks for finding it. (I could reproduce it with your file.) This patch should fix it. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707