[Lazarus] read text file in lazarus

Luca Olivetti luca at wetron.es
Wed Apr 15 09:59:30 CEST 2009


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, like a log file) you have to use lower level functions or use 
streams (which, as Hans-Peter says, lack a ReadLn method).
It's a pity that neither the standard file operations nor loadfromfile 
have a mean to specify shared access (or maybe they do but I couldn't 
find it).

Bye
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 (Ext.133)  Fax +34 93 5883007



More information about the Lazarus mailing list