hwg-techniques archives | Mar 2001 | new search | results | previous | next |
VBScript If/ElseIf Processingby "Bastyr University WebMaster" <WebMaster(at)bastyr.edu> |
|
Hello all, Say I have a vbscript that goes something like: If i =3D 1 Then=20 Misc code set 1 Elseif i =3D 2 Then Misc code set 2 Elseif i =3D 3 Then=20 Misc code set 3 End If where Misc code set # is various other vbscript code. Now let's say i =3D = 2. My question is, will the server go through and look at the 'Misc code set' = code for each item? It seems that on occasion I've seen that if there is = a problem with say Misc code set 1, I'll get an error even though that = if/then was not true. If it does go through and look at every single line = of code (used or not), this seems rather inefficient. Is there some way = of making this kind of coding more efficient so it steps through these = quicker and/or ignores unused code? It may not work this way at all, but thought I'd ask to see if anyone else = could shed some light.=20 Thanks, Doug Dossett Webmaster Bastyr University http://www.bastyr.edu
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA