Big changes have come to — all content is now read-only, and member subscriptions and the Shop have been discontinued.
Learn more

Chat | Daily Search | My GenForum | Community Standards | Terms of Service
Jump to Forum
Home: Surnames: Pascal Family Genealogy Forum

Post FollowupReturn to Message ListingsPrint Message

Two types of record in a text file
Posted by: Dante Date: November 09, 2000 at 13:57:32
  of 51

I need to read a text file with the following content:

e 1 100m swimming
e 2 400m swimming
c 1 1 62000 Albert Chan
c 1 2 71000 Mary Rey
c 2 1 54000 David Lung

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.


No followups yet

Post FollowupReturn to Message ListingsPrint Message
Search this forum:

Search all of GenForum:

Proximity matching
Add this forum to My GenForum Agreement of Use
Link to GenForum
Add Forum
Home |  Help |  About Us |  Site Index |  Jobs |  PRIVACY |  Affiliate
© 2007 The Generations Network