Using sscanf to Scan into Waves at Indexed Positions?
This is a pretty simple question - I'm just trying to use sscanf to scan into a text or numeric wave at an indexed position:
Make /O /T one, two, three, four, stringGraphInformation
FReadLine refNum, buffer
sscanf buffer, "YLeftScale%[^=]=%[^A-Za-z]%s", buffer2, buffer3, stringGraphInformation[0]
I keep getting an error message saying that it expects the name of a local numeric variable or NVAR, or a local string variable or SVAR
I was getting around this by just scanning it into a local string variable, and then copying it over to the wave as so:
stringGraphInformation[0] = yLeftScale
I would like to avoid this, however, because it makes my code look like a mess.
Thanks very much
"formatStr is followed by the names of one or more local numeric or string variables or NVARs (references to global numeric variables) or SVARs (references to global string variables), which are represented by var above."
In addition, sscanf has to be in a function, not called from the command line. Looks like you're making a file reader?
August 11, 2008 at 02:21 pm - Permalink
It's all in a procedure file - I'm not doing anything from the command line.
Thanks for your help.
August 12, 2008 at 09:39 am - Permalink