[fpc-pascal] Windows programming tutorials for FPC
Luca Olivetti
luca at ventoso.org
Sat Nov 3 23:15:15 CET 2018
El 3/11/18 a les 23:04, James ha escrit:
> Thanks for the suggestion...
>
> I put my code in the OnCreate event as you suggested, but when I try to compile it, I get wrong number of parameters specified for call to Assign... my code worked before, and I have no idea what other parameters it could want or why it would be any different than my console application.
>
> I'm doing:
> Var
> TapFileName : AnsiString;
> TapFile : Text;
>
> Assign(TapFile,TapFileName);
>
> Any ideas why this works in FPC but not in Lazarus?
Because Assign is a method of the form. Use AssignFile or System.Assign.
BTW: what I explained before is *not* how a gui application is usually
written but it should work in your case.
Bye
--
Luca
More information about the fpc-pascal
mailing list