Greater than or equal to equals less than or equal to and vice versa

image
I was chasing down a bug for a few days, when I came across this little gem. I rewrote some code a few times to figure this one out.
It took me a little time to see it, but everything made sense afterwards.
In case you can't see the image, I will explain.
I am comparing two calendar day numbers, 1 through 365/6. If today's date is similar or greater than the listed date, specific code was to fire to shift data in arrays. I noticed that when I selected <= or >= in the drop down of integer comparison block, it would insert the opposite of what I selected. (The image is worth a thousand words. The image shows that >= was previously selected, but the context menu shows that <= is actively operational)
After I fixed this by selecting the opposite of what I needed the program worked as it should.

Thanks for noticing

Not able to repeat that behaviour here.

Also unable to reproduce that.

Anything unusual about your setup we should know about?

I don't think I have any funny setup. I basically use AI2 out of the box.
It's the first time I have ever noticed this, and any other time, the code worked, proving that this one time is an anomaly. I will keep my eye on it. I am not concerned.
I extracted a new block, and it does the same thing.
image
And in a different project altogether...
image
Curiously, enabling OpenDyslexic...
image
Evidently, logic follows the chosen equation rather than what is displayed.
image
image

Do you have any local browser styles or plugins that manipulate the style settings? If it draws correctly with the open dyslexic font turned on but not without, then it might be that something is overriding our default font and causing the issue.

I double checked the code and we are definitely using the right Unicode characters for ≤ and ≥, so it's not clear why it would be drawing one direction in one context but not another.

What operating system and browser are you using?

Android 11, I believe on a Acer chromebook. chrome OS Version 123.0.6312.112 (Official Build) (64-bit)
Using the default Chomebook font, NOT customized.

Just tested on my Acer 715 chromebook, with companion app running. Still no issues.

I'd be interested in seeing what the output of the following command is in the browser console:

console.log(Blockly.Msg.LANG_MATH_COMPARE_LTE + " " + Blockly.Msg.LANG_MATH_COMPARE_GTE)

and whether that looks right.

Uncaught ReferenceError: Blockly is not defined
at :1:13

It appears it is happening in all new projects now.
I will create a small app and post the entire code, if it keeps doing this

GTE_and_LTE.aia (2.1 KB)

The only thing wrong I can see is that you type '>=' in your button.text when you code <= in the comparison.

The <= comparison works fine.



And therein lies the issue. I did not enter a >= in the code, I entered <=.
image
As the picture shows, it renders >=. If you run the program with numbers according to the text box names (low.number , high.number), the result is opposite from what the button says, no?

You don't have your device set to a Right To Left (RTL) language, do you?
(grabbing at straws)

No, there aren't any wonky settings. This thing with the <= & >= reversing is the only thing that happens.
I can live with it, but need to double check it all the time, or just shift the sentinel up or down one and use < or > instead.

Looking at your posting of the code, the comparison has corrected itself. On my screen it shows >=, but in actuality calculates <=.
Thus, running the program on my chrome book, if I enter 10 in the first box, 100 in the second box, and click on the button, the result will be "true", where according to the text, it should be "false"
image