too many parameters on command line
kbrowne
Variable index2 = 0
String boxcontent = ""
for (index2 = 0; index2 < length; index2 +=1)
String path2 = StringFromList(index2, outputPaths, "\r")
Open /R refNum as path2
if (index2 == 0)
String buffer
Variable lineNumber = 0
do
FReadline refNum, buffer
if (StringMatch(buffer, "IP*"))
String regExp = "(IP)(\\s+)(\-?[[:digit:]]+\.[[:digit:]]+)"
String parameter, space, number
SplitString /E = (regExp) buffer, parameter, space, number
Variable IP = str2num(number)-Fc // Fc is a variable generated above
String sIP = num2str(IP) // sIP is the string "-1" here
String newvalue
sprintf newvalue, "IP: ", sIP
boxcontent += newvalue
endif
lineNumber += 1
while (lineNumber <= 46)
endif
endfor
String boxcontent = ""
for (index2 = 0; index2 < length; index2 +=1)
String path2 = StringFromList(index2, outputPaths, "\r")
Open /R refNum as path2
if (index2 == 0)
String buffer
Variable lineNumber = 0
do
FReadline refNum, buffer
if (StringMatch(buffer, "IP*"))
String regExp = "(IP)(\\s+)(\-?[[:digit:]]+\.[[:digit:]]+)"
String parameter, space, number
SplitString /E = (regExp) buffer, parameter, space, number
Variable IP = str2num(number)-Fc // Fc is a variable generated above
String sIP = num2str(IP) // sIP is the string "-1" here
String newvalue
sprintf newvalue, "IP: ", sIP
boxcontent += newvalue
endif
lineNumber += 1
while (lineNumber <= 46)
endif
endfor
This error seems a bit cryptic to me, and when I choose the "Explain Error" feature in Igor, it only says "Certain commands like Duplicate and Remove can handle no more than 100 wave names in their parameter lists." Since I'm not dealing with more than 100 wave names, I don't quite understand this. I'm also confused by the error "While executing printf...", because I'm not executing printf, I'm executing sprintf. I'd greatly appreciate any help here. Thanks,
Kevin
The problem is this:
An sprintf command must have one conversion specification (e.g., "%d", "%g", "%s") for each parameter after the format string. Change it to:
Or better yet, change it to:
and get rid of sIP.
November 16, 2014 at 12:13 am - Permalink
should read
The error message is a bit confusing; agreed.
November 16, 2014 at 12:13 am - Permalink
Kevin
November 16, 2014 at 10:45 am - Permalink