Connecting Tech Pros Worldwide Forums | Help | Site Map

if or and question

Thomas Henz
Guest
 
Posts: n/a
#1: Jul 19 '05
hi there again,

can someone please show me how to transfer this php line into asp?

if(($frm_quant=="") || !($frm_quant>0 && $frm_quant<=100))

thanks a lot,

tom


Paal Andersen
Guest
 
Posts: n/a
#2: Jul 19 '05

re: if or and question



"Thomas Henz" <thenz@t-online.de> wrote in message
news:bhvmm5$n3a$05$1@news.t-online.com...[color=blue]
> hi there again,
>
> can someone please show me how to transfer this php line into asp?
>
> if(($frm_quant=="") || !($frm_quant>0 && $frm_quant<=100))
>
> thanks a lot,
>
> tom
>[/color]

remove $
||= or
&& = and

so

if(frm_quant="" or not(frm_quant>0 and frm_quant<101)) then

end if

maybe there wil be a casting here like
len(cstr(frm_quant))=0


Paal


Alan
Guest
 
Posts: n/a
#3: Jul 19 '05

re: if or and question


If ((frm_quant = "") Or (Not (frm_quant > 0 And frm_quant <= 100))) Then ...

Alan

"Thomas Henz" <thenz@t-online.de> wrote in message
news:bhvmm5$n3a$05$1@news.t-online.com...[color=blue]
> hi there again,
>
> can someone please show me how to transfer this php line into asp?
>
> if(($frm_quant=="") || !($frm_quant>0 && $frm_quant<=100))
>
> thanks a lot,
>
> tom
>[/color]


Tim Slattery
Guest
 
Posts: n/a
#4: Jul 19 '05

re: if or and question


Thomas Henz <thenz@t-online.de> wrote:
[color=blue]
>hi there again,
>
>can someone please show me how to transfer this php line into asp?
>
> if(($frm_quant=="") || !($frm_quant>0 && $frm_quant<=100))[/color]

Which language? In JavaScript, you'd have exactly the same syntax, but
the variable names would not have the $ prefix. In VBScript, the "=="
comparison operator is a single equal sign ("="). VBScript uses words
instead of symbols for logical operators (And, Or, Not). And you don't
need to surround the logical expression in an "if" statement with
parens in VBScript. So this will work in vbscript:

if (frm_quant = "") or not (frm_quant > 0 and frm_quant <= 100) then
your statements
end if

--
Tim Slattery
MS MVP(DTS)
Slattery_T@bls.gov
Guinness Mann
Guest
 
Posts: n/a
#5: Jul 19 '05

re: if or and question


In article <bhvrij$h9a$1@yarrow.open.ac.uk>, P.A.Ward@open.ac.uk says...[color=blue]
> The $64,000 question - does php "short-circuit" it's If's?
> Given the tests being done (value supplied, then value range),
> I would suspect so, so we have to be a bit cleverer:[/color]

Good save, Phil!

-- Rick

Closed Thread


Similar ASP / Active Server Pages bytes