[thelist] Re: if...or...then in asp
Anthony Baratta
thelist at lists.evolt.org
Mon Feb 25 14:02:01 2002
At 11:39 AM 2/25/2002, darren wrote:
>On 25 February 2002 at 19:24:10, Anthony Baratta <Anthony@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."