Is there a bug in text file handling? FPC 3.2.2, Lazarus 3.2 - recently updated.
I have a few hundred lines of code. In the global variables there is
{$DEFINE debug}
{$IFDEF debug}
debugfile: Text;
{$ENDIF}
and later:
{$IFDEF debug}
assign(debugfile, 'overfs.debug'); // problem here
rewrite(debugfile);
{$ENDIF}
(I'm doing it this way because I need to collect a whole lot of data - more than I want to see in the debugger.)
The editor is perfectly happy to suggest completions for the assign - for example suggesting Assign(out t: text; const c: shortstring);
But the compiler has other ideas:
unit1.pp(343,36) Error: (3026) Wrong number of parameters specified for call to "Assign"
/usr/local/lib/fpc/3.2.2/units/x86_64-linux/rtl/classes.ppu:persist.inc(104,23) Error: (5088) Found declaration: Assign(TPersistent);
(That declaration is the first in the list offered by the code editor. but not the one for today.)
I have worked around this issue with a stringlist, but what is happening? Enquiring minds etc.