linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* parsing with fscanf().
@ 2002-09-11 18:24 Elias Athanasopoulos
  2002-09-11 19:36 ` Glynn Clements
  2002-09-11 22:14 ` Richard Webb
  0 siblings, 2 replies; 6+ messages in thread
From: Elias Athanasopoulos @ 2002-09-11 18:24 UTC (permalink / raw)
  To: linux-c-programming

Hi,

A really newbie question, but I have no time for research (my deadline
is counted in hours).

I have to parse a text file, which has been exported from MS Excel (I
have no access to this thingie) using TABs as delimeters. The text
is like:

4	3	2.0
5		1.2
4	3	2.4

I use fscanf() to insert the data to my structures, but the "gap" (between
5 and 1.2) breaks the sequence. fscanf() places the 3rd column to the 2nd
field in my structure.

Is there a trivial way to bypass the problem using fscanf() or I have to do 
the parsing using read()?

Elias

-- 
http://gnewtellium.sourceforge.net			MP3 is not a crime.	

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-09-12  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-11 18:24 parsing with fscanf() Elias Athanasopoulos
2002-09-11 19:36 ` Glynn Clements
2002-09-11 20:08   ` Elias Athanasopoulos
2002-09-12  7:25     ` Mohammed Khalid Ansari
2002-09-12  7:21       ` Carlos Fernández
2002-09-11 22:14 ` Richard Webb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).