Correction SS-2331
2 votes

Brackets around assignment

Created by Mike Kaganski on 4/26/2016 2:48 PM Last Updated by smath on 10/11/2016 12:00 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

When an assignment isn't the only part of an expression, then it should be authomatically enclosed in brackets.

Without this, there are multiple ambiguities possible.

E.g.: this post shows seemingly incorrect assignment (original .sm is attached). It is caused by doing arithmetics with results of assignments (after the assignment is finished).

Another issue is here: as the assosiativity of assignment is left-to-right, so it's impossible to use syntax like a:=b:=3 (which would be elegant if enabled). However, automatic insertion of brackets here would help understand what is actually being calculated.

    smath (Monday, October 10, 2016 11:59 PM) #

Fixed.