Re: [Lazarus] read text file in lazarus

2009-04-15 Thread Luca Olivetti
En/na svaa ha escrit: My complain was that when Dians asked about how to read a text file, the right answer should had been showing both ways. Note that both require exclusive access to the file. If you want shared access (e.g. to read a file that some other process has open for writing,

Re: [Lazarus] read text file in lazarus

2009-04-06 Thread Bernd Mueller
svaa wrote: So the conclusion: For many cases, loadFromFile is faster. Even when increase the text buffer and try again ;-) Regards, Bernd. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org

Re: [Lazarus] read text file in lazarus

2009-04-05 Thread svaa
Hello: I have made my two cents benchmark. Two small programs (just FPC file, without Lazarus). one with LoadFromFile and one with readln(file,-..). For small files, the LoadFromFile is faster. For big files, readln way is faster (in my system, for over 150K files, old-fashioned becomes

Re: [Lazarus] read text file in lazarus

2009-04-04 Thread svaa
Hello: I am astonished. It breaks my heart, I am crying: Nobody has even mentioned the old-fashion classic Pascal way for reading a text file. Traitors. ;-) Loading a text file in a TStringList with LoadFromFile method is a good option, it is easy, it is simple and you can access to any line

Re: [Lazarus] read text file in lazarus

2009-04-03 Thread Dians
: interesting but i'm still newbie.. how do i read text file in lazarus , i have been looking for documentation but i have not still get it yet, i have You could also use the RTL as follows: var sl: TStringList; begin sl := TStringList.Create; sl.LoadFromFile('/tmp/readme.txt'); // now you

Re: [Lazarus] read text file in lazarus

2009-04-03 Thread Graeme Geldenhuys
2009/4/3 Dians diansopand...@gmail.com: is there any documentation or link, which i be able to read to use all feature of lazarus/FPC like Lazarus/FPC from scracth ,from instalation (in linux) until to use of feature of lazarus/FPC. Simply press F1 in Lazarus and it will probably find you some