Page 1 of 2

Confused about >=

Posted: Thu Sep 19, 2019 3:14 pm
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?
greaterOrEqual.png
What the he.........ck......?!!?

Re: Confused about >=

Posted: Thu Sep 19, 2019 3:30 pm
by Klaus
Sorry, no capisce? What exactly is your problem/question?

Re: Confused about >=

Posted: Thu Sep 19, 2019 3:47 pm
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:

Re: Confused about >=

Posted: Thu Sep 19, 2019 3:59 pm
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

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:06 pm
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.

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:09 pm
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!

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:14 pm
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

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:40 pm
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.

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:49 pm
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

Re: Confused about >=

Posted: Thu Sep 19, 2019 4:56 pm
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.

Re: Confused about >=

Posted: Fri Sep 20, 2019 10:55 am
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.

Re: Confused about >=

Posted: Fri Sep 20, 2019 11:34 am
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 7453 times
-
Also good:

https://livecode.fandom.com/wiki/Less_than_or_equals

Re: Confused about >=

Posted: Fri Sep 20, 2019 12:13 pm
by bogs
Yah, I love Devin's course :D

Re: Confused about >=

Posted: Fri Sep 20, 2019 6:36 pm
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.

Re: Confused about >=

Posted: Fri Sep 20, 2019 9:06 pm
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