Home > front end >  Please help me have a look at this ASP statements have what wrong? Thank you very much!
Please help me have a look at this ASP statements have what wrong? Thank you very much!

Time:09-27

<%
'split a set of Numbers into an array, then accumulate
ArrCont=", 2.4, 3.8, 20.9, 33,22.15 "
SArr=Split (ArrCont, ", ")

SArrTotal=0
For I=LBound (sArr) to UBound (sArr)
Response. Write "sArr (" & amp; I&" )="& amp; SArr (I) & amp;"
"
SArrTotal=sArrTotal + sArr (I)
Next
Response. Write "sArrTotal=" & amp; SArrTotal&"
"
%>

CodePudding user response:

This split function c # ', 2 'this kind of situation will be split into two elements, an empty string and 3 May be empty strings and Numbers add wrong

CodePudding user response:

For I=1 to...
  •  Tags:  
  • ASP
  • Related