[Lazarus] reading FORTRAN-style input in Lazarus
Alexander Klenin
klenin at gmail.com
Fri Aug 5 12:34:01 CEST 2011
On Fri, Aug 5, 2011 at 21:15, Michael Schnell <mschnell at lumino.de> wrote:
> 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
David did not say it explicitly, but I guess the problem is that some fields
may not have separators at all, and parsing is based on the fixed field widths.
Hence my suggestion of using file of packed records.
--
Alexander S. Klenin
More information about the Lazarus
mailing list