Re: Two types of record in a text file
Posted by Martin Jackson on November 10, 2000 at 10:33:21:
In Reply to: Two types of record in a text file posted by Dante on November 09, 2000 at 23:16:20:
Once you have the line in a variable, you can just check the first character and check to see if it is an 'e' or a 'c'.
procedure processline( aLine : String );
if aLine = 'c' then
If you want an example, request by email.
: e 1 100m swimming
: Here are two types of record, one is for an event (the first two lines) and the other is for competitor (the last three lines). e and c at the beginning is the indicator.
: How can I read the record from the file line by line and then determine the type of it by the indicator. And then according to its type, read the fields into different variable?
: I would appreciate any comment or suggestion, Thanks a lot.