Bug SS-55
4 votes

Assignment operator priority

Created by Martin Kraska on 3/23/2014 6:48 PM Last Updated by faren fatgas on 2/25/2026 9:09 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

The assignment operator := has a higher priority than the boolean operators. Therefore, expressions like c := a≡b are interpreted as (c := a)≡b, which is most likely not the intent of the user. The same holds for other boolean operators. However, and, or and xor enforce parens around their arguments, such that the wrong expression immediately can be recognized.

boolshit.PNG

    faren fatgas (Wednesday, February 25, 2026 9:09 AM) #

Hey, terwijl ik rondkeek naar nieuwe casino’s zag ik dat ze speciale bonussen hebben voor spelers uit België, dus probeerde ik https://gamblorias.be uit nieuwsgierigheid. Ik startte met Big Bass Splash, verloor een paar ronden, verhoogde toen mijn inzet iets en activeerde de bonusronde die flink uitbetaalde. Die comeback voelde echt goed, en sindsdien speel ik hier regelmatig.

    Nkosi Takoa (Thursday, September 4, 2025 9:51 AM) #

In Bloodmoney, every heist brings opportunity, but every success makes you a bigger target in a world of rivals.

    knitgrow (Thursday, July 17, 2025 10:37 AM) #

This has effectively turned into a “feature” (albeit a confusing one), primarily used for adding geometry dash litecomments—especially within blocks. For example:

a := 1 = "This is a comment"

    Martin Kraska (Wednesday, February 28, 2018 9:40 PM) #

Status update with build 6626:

Some of the operators behave as expected, some don't. An improvement is that now you see the priority immediately by the added brackets. An assignment sometimes require to bracket the right hand side, sometimes not. I prefer to never require the rhs to be bracketed in an assignment.

However, the editor behaviour is strange, If you type a:b and then add an low priority operator, the left side a:=b is put in brackets and the cursor is placed to the left of the operator instead to the right. This is just a strange side effect, no point in fixing this without fixing the priorities.

Is there any explanation why the priority of exclusive or is different to that of or?

    Mike Kaganski (Wednesday, April 13, 2016 4:29 AM) #

Currently, this has become a "feature" (confusing, I must say), used for commenting purposes (esp. in blocks), e.g.:

a:=1="This is a comment"