help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading comma delimited files with fscanf


From: Bruce Moore
Subject: Reading comma delimited files with fscanf
Date: Mon, 23 Sep 2002 21:30:20 -0700 (PDT)

I'm trying to read a comma delimited file of the
format

1,2,"State 1","State 2",10,5,0.5

using

fscanf("%i,$i,\"%s\",\"%s\",$i,%i,%f","C");

it assigns the first two integers correctly, but it
puts all of the remaining tokens into the first of the
string variables.

Is a space the only way to terminate a string?



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]