vanam srihari kumar wrote:
I am getting the below errors while using read and readln functions.
READ(i_f, PrcObj^.state); ReadLN(i_f,CurPar^.bvalue);
error1: argument to `Read'/`ReadLn' from `Text' file is of wrong type error2: argument to `Read'/`ReadLn' from `Text' file is of wrong type
Reading Boolean and enum values are a Sun Pascal extension that GPC doesn't yet support. We could add it in a future version, but at the moment (and without upgrading GPC), you'll have to change the code.
(You could look at StrReadEnum in the StringUtils unit that comes with GPC, but you'll need some extra work when using it. Or you could write something similar yourself.)
Frank