Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

how use a text file in lazarus ?

Help
histrion
2005-02-02
2013-04-29
  • histrion
    histrion
    2005-02-02

    i don't understand :

    i've write this :

    (.......)
    var

        ficgenh : Text;
         i:integer;
         chem2,str1:string;

    begin
         chem2:='.\GenHave.txt';
         assign(ficgenh, chem2);
         reset(ficgenh) ;
    (.......)

    and when i compile i've the message :
    "error in type definition"
    with "ficgenh : Text;" ligne in color

    and of couse error for "assign", "writeln" .....

    where's my error ?
    excuse me i'm a new user of lazarus
    i usualy use the same command in dev-pas ( use free pascal too) and it's work.

    can someone help me to understand ?
    thank you

     
    • histrion
      histrion
      2005-02-02

      i  use this instruction in Delphi and is work well too.

       
    • The lazarus form has a text property and an assign method. They conflict with the identifiers from the system unit.

      var

      ficgenh : System.Text;
      i:integer;
      chem2,str1:string;

      begin
      chem2:='.\GenHave.txt';
      assignfile(ficgenh, chem2); 
      //or system.assign(ficgenh, chem2);
      reset(ficgenh) ;
      (.......)