greater than and less than

Results 1 to 2 of 2

Thread: greater than and less than

  1. #1
    Join Date
    Dec 1969

    Default greater than and less than

    Hi,<BR><BR>Bit of a simple question, but it&#039;s Friday and things just don&#039;t seem to be working. How do I combine a greater than and less than statement?<BR><BR>if spaces &#062;4 and &#060;10 then<BR>pprojprice = 36<BR>end if<BR><BR>doesn&#039;t seem to work. I guess I could do:<BR><BR>if spaces &#062;4 and spaces &#060;10 then<BR>pprojprice = 36<BR>end if<BR><BR>but is there not a more efficient way of writing this? (I&#039;ve got quite a lot to do). Also, in which cases can you get away with not typing the "end if"?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: greater than and less than

    okay<BR><BR>you can get away with the end if... but you have to put your IF-statement in 1 line...<BR><BR>if spaces &#062;4 and spaces &#060;10 then pprojprice = 36<BR><BR>works...<BR><BR>second question... if you&#039;d use SQL you could use the "BETWEEN" syntax. But I guess for just an ASP comparison you have to repeat the "spaces"...<BR><BR>if spaces &#062;4 and spaces &#060;10 then<BR> pprojprice = 36<BR>end if<BR>

Posting Permissions

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