Confused about >=

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Confused about >=

Post by bogs »

I only just this morning got around to looking this up in the dictionary (after trying to figure out why I was getting bizarre results in some of my scripting), and to say the least found the reasoning in the description confusing as all get out.
Summary:
Compares two values and returns true if the first value is greater than or equal to the second value, false otherwise.
Examples:
22 = 23
myValue = 0
Use the = (greater than or equal to) operator to compare two numbers or to compare the alphabetical order of two strings.
Parameters:
The operands value1 and value2 can be numbers, literal strings of characters (delimited with double quotes), or any sources of value.
In every other language I have ever programmed in, as well as apparently Hyper-card itself, <= or >= indicates less than/equal too, or greater than/equal too, while the bare = should only indicate two items being equal. Why in the world would this not be the case here?
What the he.........ck......?!!?
What the he.........ck......?!!?
Image
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Confused about >=

Post by Klaus »

Sorry, no capisce? What exactly is your problem/question?
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

Klaus, are you telling me that you know of someplace on planet Earth where "=" amounts to "greater than" ? Please feel free to enlighten me.

To boot, I thought (especially after some of the discussions I've been a participant in) that the idea was to make this language work the same on all supported platforms. Instead, this, which is probably one of the most basic things in programming, works one way on Macs, and not at all on the two other supported desktops.

I am agog if you don't find that to be a little 'confusing' :shock:
Image
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: Confused about >=

Post by richmond62 »

Screenshot_20190919_175800.png
-
Unless I've missed something in the last 50 years. 8)

AND, oof, I cannot resist it; a little "something" for Klaus:
-
Screenshot_20190919_180050.png
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

On further testing, I found out that the dictionary entry is actually incorrect !

= does not stand for what the dictionary says at all. It actually *does* work just as you learned it in grade school (and everywhere else). I then checked the later dictionary versions, and found it was corrected somewhere along the way in those editions.
Image
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Confused about >=

Post by Klaus »

Ah, sorry, completely overlooked this line:
...
Use the = (greater than or equal to) operator to compare two numbers or to compare the alphabetical order of two strings.
...
This is of course a glitch in the documentation! 8)
For crossplatform only use <= and >=, what Richmond show in the pics will only work on a Mac and throw an error on other platforms!
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

Klaus wrote: Thu Sep 19, 2019 4:09 pm This is of course a glitch in the documentation! 8)
Thank goodness, all is well in the world again :D
Image
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Confused about >=

Post by FourthWorld »

I think it's an HTML rendering anomaly in which ">" is present not not escaped and therefore not showing.

Most such instances were caught and fixed by an automated process during the Dictionary transition to HTML. Apparently this one wasn't picked up.

File a bug report and this will be fixed quickly.

Even better, dive into GitHub and fix it directly so you know it's done now.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

FourthWorld wrote: Thu Sep 19, 2019 4:40 pm I think it's an HTML rendering anomaly in which ">" is present not not escaped and therefore not showing.
...Most such instances were caught and fixed by an automated process during the Dictionary transition to HTML. Apparently this one wasn't picked up.
It was already fixed in (at least) the online version of the dictionary, it is only incorrect in the reference for the versions I use, such as <= v7.

Side note, I see a bot jumped in right after you, Richard :D
Image
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Confused about >=

Post by FourthWorld »

Good to know it's already been fixed, Bogs. Thanks. That's one more reason I spend most of my time with the latest build, so I can enjoy the benefits of all the work the core team and the community have been doing.

And thanks for drawing my attention to the bot post. Deleted and banned.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

FourthWorld wrote: Thu Sep 19, 2019 4:56 pm That's one more reason I spend most of my time with the latest build, so I can enjoy the benefits of all the work the core team and the community have been doing.
Heh, well, I suppose that is putting the brightest spin on it. While I am glad it was updated and (hopefully) won't confuse anyone going forward, the dictionary is one of those funny little things that doesn't quite work correctly on almost any version of 'nix.

I'll stick with the versions I use most often, just to know that if I want to look something up (among other things), it will be quick and painless to do.
Image
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: Confused about >=

Post by richmond62 »

the dictionary is one of those funny little things
Not funny, not little and not up-to-date, but much vaunted by those
who are at the stage they don't need to use it any more.

Didn't help any of the kids or adults who attended my courses over the Summer.

Devin Asay at Brigham Young Uni' is doing a better job:

http://livecode.byu.edu/transcript/Transcript2.php
-
Screenshot 2019-09-20 at 13.36.54.png
Screenshot 2019-09-20 at 13.36.54.png (15.81 KiB) Viewed 8760 times
-
Also good:

https://livecode.fandom.com/wiki/Less_than_or_equals
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

Yah, I love Devin's course :D
Image
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10105
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Confused about >=

Post by FourthWorld »

bogs wrote: Fri Sep 20, 2019 10:55 am
FourthWorld wrote: Thu Sep 19, 2019 4:56 pm That's one more reason I spend most of my time with the latest build, so I can enjoy the benefits of all the work the core team and the community have been doing.
Heh, well, I suppose that is putting the brightest spin on it. While I am glad it was updated and (hopefully) won't confuse anyone going forward, the dictionary is one of those funny little things that doesn't quite work correctly on almost any version of 'nix.
Also addressed in v9 and forward: while the team is working out the dependencies to get the browser widget working well across supported Linux distros, they've updated the IDE so that choosing Dictionary from the Help menu opens the Dictionary well, just in your default browser rather than a browser instance inside LC.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Confused about >=

Post by bogs »

In the browser, and minus the 'guide' part, to me equals
doesn't quite work correctly on almost any version of 'nix.
...when compared to say, Windows or Mac.
Maybe I should add this symbol[<=>] to my posts next :D
Image
Post Reply