[thelist] ASP Loop Question

Warden, Matt mwarden at mattwarden.com
Wed Mar 20 23:32:00 CST 2002


On Mar 20, James Q. Stansfield had something to say about Re: [thelist] ASP...

>
>EVAL() is a wonderful tool.
>
><%
>
>variable_1 = "string1"
>variable_2 = "string2"
>variable_3 = "string3"
>variable_4 = "string4"
>variable_5 = "string5"
>variable_6 = "string6"
>variable_7 = "string7"
>variable_8 = "string8"
>variable_9 = "string9"
>variable_10 = "string10"
>
>
>for x = 1 to 10
>    variable = "variable_" & x
>    response.write( eval(variable) & "<br>"  )
>next

be careful with eval(). it's a lot easier to create code that will
generate errors based on the situation (those are the really hard ones to
find because you might not even come across them in debugging/testing
phase).


there was a thread on eval in CF and reasons not to use it... mabe 4
months ago. you can hit the archives at http://lists.evolt.org

hth,

--
mattwarden
mattwarden.com




More information about the thelist mailing list