[fpc-pascal] How to initialize a "Text" variable?

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Sat Mar 15 12:34:53 CET 2008


Hello,

I have the following variable that I need to initialize:

yyinput: Text;

I searched, but I can't find anything that explains what this is, or
how to initialize it. Is the Text type the same as TextFile?

I would like to set this variables to the contents of a file, so I
tryed the following, but it crashes with runtime error 123 ( 'No
medium found' ) and no error message.

  AssignFile(lexlib.yyinput, AFileName);
  Reset(lexlib.yyinput) ;

  fmlscan.yylex();

  CloseFile(lexlib.yyinput) ;

thanks,
-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list