Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 dividing a string
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

quince
Junior Member

Canada
103 Posts

Posted - 27 March 2007 :  19:48:39  Show Profile
Hello,

i got this string 50,5344137,0427,00005,6344137,6340,6344,,,,,1,0427000055307601,5307601,0427,00005,0427000055307601,124DEC5,934069,9031,0427000055307601,0427000055307601,FFFF,934069,9,1,0,3,184,2006112614020332,0,0,1,0,,,,,,,,,,

and i need to divide each field from the other, i tried to use the array but it didn't except the letters
Code
<%
Dim a
a = array(50,5344137,0427,00005,6344137,6340,6344,,,,,1,0427000055307601,5307601,0427,00005,0427000055307601,124DEC5,934069,9031,0427000055307601,0427000055307601,FFFF,934069,9,1,0,3,184,2006112614020332,0,0,1,0,,,,,,,,,,)
response.write(a(0))

%>

Error
Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/test/test3.asp, line 3, column 112

please advice,
Thanks in advance,
quince

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 27 March 2007 :  22:16:56  Show Profile  Visit HuwR's Homepage
you can use the 'split' function to convert a comma delimited string into an array
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 28 March 2007 :  03:28:07  Show Profile
Thanks huwr, i have done it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07