Probably simple but, how do I compare numbers

# Thread: Probably simple but, how do I compare numbers

1. Join Date
Dec 1969
Posts
39

## Probably simple but, how do I compare numbers

Cannot figure out how to say "and" when comparing 2 variables<BR><BR>&#060;%<BR> dim w, h, q <BR>w = request("width") <BR>h = request("height") <BR>q = request("qty")<BR>IF w = "19.75" AND IF h = "19.75" <BR>Then t = 20.14 <BR>Else<BR>t = w*h*.05+q <BR>End if<BR>%&#062;<BR><BR>How would I make a case <BR><BR>If A = 1 <BR>And B = 2 <BR>Then C = 3<BR>Else C = 4<BR>Endif<BR><BR>Also how would I say or<BR>If A = 1<BR>And B = 2<BR>Or A = 2<BR>And B = 1<BR>Then C = 3<BR>Endif

2. Member
Join Date
Dec 1969
Posts
46

## RE: Probably simple but, how do I compare numbers

dim w, h, q <BR>w = request("width") <BR>h = request("height") <BR>q = request("qty")<BR>IF w = "19.75" AND h = "19.75" <BR>Then t = 20.14 <BR>Else<BR>t = w*h*.05+q <BR>End if<BR>

3. Senior Member
Join Date
Dec 1969
Posts
2,493

## RE: Probably simple but, how do I compare numbers

&#060;%<BR>I don&#039;t know about acase statement with 2 values but<BR><BR>A=1<BR>B=2<BR>If (A = 1 And B = 2) Or (A = 2 And B = 1) Then <BR>C = 3 <BR>End if <BR>response.write C<BR>%&#062;

4. Join Date
Dec 1969
Posts
39

## RE: Thanks, that works! Hey Steve?

Are you the pole vaulter?

5. Senior Member
Join Date
Dec 1969
Posts
2,493

## Welcome :) <eop>

.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•