silly question but I can't find the answer anywhere...
How do I initialize a variable of the type : textfile ?
I keep getting the following hints from the compiler using FPC but I can't
figure it out.
Hint: Local variable "inFile" does not seem to be initialized
It's been ages since I've used Pascal and I know I'm missing something but I
can't find the answer. "inFile" is of the type textfile. Of course,
everything works, it's just I am old school and like it when I run the
compiler and get no warnings or hints.
Is there somewhere I'm not looking for the information ?
> How do I initialize a variable of the type : textfile ?
> I keep getting the following hints from the compiler using FPC but
> I can't
> figure it out.
> Hint: Local variable "inFile" does not seem to be initialized
It is because the text/file parameter of assign() is a "var"
parameter, and "var" means that the input should already be valid.
For some reason, all the assign() variants are defined as
thanks for the answer! I had this horrible nightmare that I am writing icky
code that was going to crash and burn on me some time. The mailing seems
extremely quiet, is everyone very smart or is there another reason for it ?
I'm not even sure if I can post questions about Pascal programming to this