Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DBPro - At Least / At Most

Author
Message
Captain GerBear
18
Years of Service
User Offline
Joined: 9th Jul 2006
Location:
Posted: 7th Feb 2009 04:19
This is kind of embarrassing because I should know this by now, but what is the proper syntax for at least/at most? <= / >= ?

For instance -

IF ABS(Value MOD 90) "at least" 45 THEN: DO_STUFF()
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 7th Feb 2009 04:34
">" is greater than
"<" is less than
"<>" is not equal to

ie
a=ABS(Value MOD 90)
IF a>45 and a<"largest value of the range" and THEN: DO_STUFF()

that?
Captain GerBear
18
Years of Service
User Offline
Joined: 9th Jul 2006
Location:
Posted: 7th Feb 2009 04:51
That's not exactly what I meant, more like < and > but inclusive instead of exclusive.

I actually messed around with it, and it seems that <= works.

<= (at most)(Less than or equal to)
>= (at least)(Greater than or equal to)


IF A <= 45 then: ..... includes 45, 44, 43, 42, etc
whereas
IF A < 45 then: ...... includes 44, 43, 42, 41, etc
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 7th Feb 2009 05:16
Should have realised that really! I didn`t even put 44!!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Feb 2009 13:35
You have the right syntax there already...but you could have saved a lot of time by writing a few lines of code and testing it!

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th Feb 2009 13:40
Quote: "what is the proper syntax for at least/at most? <= / >= ?"


I'm sorry for finding this funny... lol
This is one of the rare cases where a person asks something and answers it in his own question.

Captain GerBear
18
Years of Service
User Offline
Joined: 9th Jul 2006
Location:
Posted: 7th Feb 2009 18:01
Yes, sorry D: I was coding all day and my brain was turning to mush. Sometimes the easiest method of finding something out totally eludes me.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Feb 2009 18:25
Here's my teacher always described it, remember the alligator's mouth ">" always opens up to the largest number.

Your signature has been erased by a mod because it's larger than 600x120

Login to post a reply

Server time is: 2024-11-25 10:56:36
Your offset time is: 2024-11-25 10:56:36