.asp question....
.asp question....
- Started
- Last post
- 3 Responses
- pixelEngine
Is there a better way to write this OR statement??
IF (headerchoice = 1) or (headerchoice = 3) or (headerchoice = 7) or (headerchoice = 6) or (headerchoice = 5) or (headerchoice = 4) THEN
tnx NT.
- dc_again0
how about
if(headerchoice=(1or3or7or, etc)) THEN
? like in javascript you'd do:
of(this==(1||2||3)){
}or use a switch
switch(headerchoice)
case(1)
DO THIS
case(2)
DO THIS
etc...
- blindpilot0
select case is a good method - much neater
- connerd0
if (headerchoice != 2) and
(headerchoice > 0) and (headerchoice < 8) then.. a little shorter but maybe more confusing. 1 through 7 except 2?