[Lazarus] reading FORTRAN-style input in Lazarus
Michael Schnell
mschnell at lumino.de
Fri Aug 5 12:15:29 CEST 2011
On 08/05/2011 06:06 AM, David M. Lawrence wrote:
>
> I'm now trying to convert one of my most useful programs to PASCAL,
> but I am hung up on how to read multiple variables from a single line.
>
A convenient and very versatile way is to do a TStringList.LoadFromFile
and loop through the strings.
For each string you can use TStringList.DelimitedText to get the values
separated by blanks
sltokens := TStringList.Create;
sltokens.DelimitedText:= ' ';
sltokens.CommaText:= slfile[i];
-Michael
More information about the Lazarus
mailing list