Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The “strtok” command only allows

Status
Not open for further replies.

PhonemanSam

Technical User
Dec 4, 2003
70
US
The “strtok” command only allows s1 thru s9.
What command would you use if you needed s1 thru s25.

strtok s1 s0 "," 1 ;s1=INPUT1
strtok s2 s0 "," 1 ;s2=INPUT2
strtok s3 s0 "," 1 ;s3=INPUT3
strtok s4 s0 "," 1 ;s4=INPUT4
strtok s5 s0 "," 1 ;s5=INPUT5
strtok s6 s0 "," 1 ;s6=INPUT6
strtok s7 s0 "," 1 ;s7=INPUT7
strtok s8 s0 "," 1 ;s8=INPUT8
strtok s9 s0 "," 1 ;s9=INPUT9
strtok s10 s0 "," 1 ;s10=INPUT10
strtok s11 s0 "," 1 ;s11=INPUT11
strtok s12 s0 "," 1 ;s12=INPUT12
strtok s13 s0 "," 1 ;s13=INPUT13
strtok s14 s0 "," 1 ;s14=INPUT14
strtok s15 s0 "," 1 ;s15=INPUT15



Nortel all the way
 
I wasn't able to duplicate your problem. I built a test string of 25 comma separated values and was able to parse and display them all.

Could you possibly post your test data? Maybe it has to do with that.
 
s1 through s9 are predefined variables in ASPECT. Any additional variables above s9 would have to be declared at the beginning of your script. Did you do so?

 
Ah, that explains why it worked for me. I did not use s1 through s9, I created my own variables (sTok1 through sTok25, creative huh?)

 
Sorry for the delay in replying (family emergency)
Thanks "knob" & "kodr" making my own variables did the trick

Nortel all the way
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top