[thelist] Re: if...or...then in asp

Anthony Baratta Anthony at Baratta.com
Mon Feb 25 14:02:01 CST 2002


At 11:39 AM 2/25/2002, darren wrote:
>On 25 February 2002 at 19:24:10, Anthony Baratta <Anthony at Baratta.com> wrote:
>
>AB> If (Not IsNumeric(Request("curpage"))) _
>AB>          Or (CInt(Trim(Request("curpage"))) < 1) Then
>
>if Request("curpage") is not numeric wouldn't this throw an error as asp
>doesn't short-circuit the logic...it's always going to check both terms
>even though the isNumeric test has failed?

No. With the "OR", once the isNumeric fails it stops and won't evaluate the
CInt.
----
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."




More information about the thelist mailing list