Any End-Of-Line Code? lazarus / 13-General ---------------------------------------------------------------------- alanlam2009 · 2008-01-29 13:44 When i was using Turbo Pascal, i usually, use eol(End-Of-Line) to check whether i reach th end of line or not. However, i cannot use it in Lazarus, Why? Any other code that can reach my goal? ---------------------------------------------------------------------- alanlam2009 · 2008-01-29 13:48 i got it, it is eoln, but it said "summary_unit.pas(150,60) Error: Call by var for arg no. 1 has to match exactly: Got "AnsiString" expected "Text"" What happen? ---------------------------------------------------------------------- Ñuño_Martínez · 2008-01-29 14:24 A little bit of code, please? AFAIK "Text" is a file type and "STRING" isn't.  :? ---------------------------------------------------------------------- alanlam2009 · 2008-01-30 13:47 essay_content : string; while not(eof(file_get)) do                           begin                                readln(file_get, essay_content);                                while not(eoln(essay_content)) do                                      begin ---------------------------------------------------------------------- Leledumbo · 2008-01-31 04:19 AFAIK, EoLn is used to check end-of-line IN A FILE (more appropriately, Text). http://freepascal.org/docs-html/rtl/system/eoln.html If you want to loop the string, why don't you use: Code: [Select] var   i: integer; ... for i:=1 to length(essay_content) do begin   // whatever end; ---------------------------------------------------------------------- alanlam2009 · 2008-01-31 11:44 summary_unit.pas(160,35) Error: Illegal counter variable summary_unit.pas(191) Fatal: There were 1 errors compiling module, stopping HELP!!!!! TODAy IS deadline ---------------------------------------------------------------------- Almindor · 2008-01-31 17:23 we can't help without seeing some code. ---------------------------------------------------------------------- Ñuño_Martínez · 2008-02-01 08:39 Quote from: "alanlam2009"summary_unit.pas(160,35) Error: Illegal counter variable Counter variable must be local not global. ---------------------------------------------------------------------- theo · 2008-02-01 11:33 Can you describe what your goal is? http://www.catb.org/~esr/faqs/smart-questions.html#goal Maybe a StringList.LoadFromFile does what you want.