hello,
this code gives me one short of the ubound function, what is wrong ?
e.g if i have 353425432,325423,2542354
it gives me 2 instead of 3
Code:jumvar = request.QueryString("one") jumvarsplt = split(jumvar,",") valnum = CInt(ubound(jumvarsplt))
| SitePoint Sponsor |





hello,
this code gives me one short of the ubound function, what is wrong ?
e.g if i have 353425432,325423,2542354
it gives me 2 instead of 3
Code:jumvar = request.QueryString("one") jumvarsplt = split(jumvar,",") valnum = CInt(ubound(jumvarsplt))
You realize that you start refrencing an array at 0, right?
ie..
0, 1, 2 -> 3 elements
0, 1, 2, 3 -> 4 elements
Code:jumvar = "353425432,325423,2542354" jumvarsplt = split(jumvar,",") valnum = CInt(ubound(jumvarsplt)) Response.Write jumvarsplt(0) & "<BR>" Response.Write jumvarsplt(1) & "<BR>" Response.Write jumvarsplt(2) & "<BR>"
Last edited by RhythmAddict; Mar 11, 2005 at 15:38. Reason: added a little code..





oh ok, thanks
Bookmarks