Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access values from file

Status
Not open for further replies.

tougo

Technical User
Sep 9, 2002
27
GB
i have a *.txt with some values that some equations of my program must access so as to return results
how can i access the file and specify at which line of the *.txt is the correct value?
any help would be more than welcome
 
for example
i have in the txt 4 values

34.567
65.467
84.367
84.564

and i want to multiply the first with the last and i want the result in a Tlabel in my programme how can i access this values?
 
With the functions seek or fseek you can position the reading pointer to any place in the file.

hnd
hasso55@yahoo.com

 
A couple of options are to use a file stream object (see TFileStream) or perhaps an INI file style method (see TIniFile).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top