![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm working in ASP, and I'm trying to refine a site I inherited. In particular, there was code that looked like this (it checked for 15 different variables, doing it one at a time, "hardcoded," rather than through a loop): '----------------------------------------------------------- if strOut1 <> "" then If strOut1 = "N/A" then strOut1 = " " else strOut1 = strOut1 & "," end if end if if strOut2 <> "" then If strOut2 = "N/A" then strOut2 = " " else strOut2 = strOut2 & "," end if end if '----------------------------------------------------------- ....and so on.........until we get to strOut15 I'm looking at doing this through a loop and was wondering what the best way would be? Here's what I have so far: '----------------------------------------------------------- for a=1 to 15 if "strOut"&a <> "" then If "strOut"&a = "N/A" then strOut(a)=" " else strOut(a) = "strOut"&a & "," end if else strOut(a) = "" end if next '----------------------------------------------------------- Thanks for any help. Regards - Louis |
![]() |
| Thread Tools | |
| Display Modes | |
| |