Strogian
09-20-2004, 02:03 AM
Function bob(input)
Dim string
For Each string In input.Strings
bob = bob & string
Next
End Function
Function bob(input)
Dim string, finalstring
For Each string In input.Strings
finalstring = finalstring & string
Next
bob = finalstring
End Function
Which one is better? My C background makes me want to do the second one, but what is more natural in ASP/VBScript? My concern is that just saying "bob = bob & string" might be slower than "finalstring = finalstring & string", similar to how 'Session("bob") = Session("bob") & string' would be slower.
Dim string
For Each string In input.Strings
bob = bob & string
Next
End Function
Function bob(input)
Dim string, finalstring
For Each string In input.Strings
finalstring = finalstring & string
Next
bob = finalstring
End Function
Which one is better? My C background makes me want to do the second one, but what is more natural in ASP/VBScript? My concern is that just saying "bob = bob & string" might be slower than "finalstring = finalstring & string", similar to how 'Session("bob") = Session("bob") & string' would be slower.