Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

Remove all special adjustments to the operator precedence rules in shortcut operator statements. This is an extension / cleanup of the change in 6.5.1708.1, compiler edit 958, which restored the normal precedence rules for trailing USING operators. Under the new rules, shortcut operator expansion is as simple as:

a += ...    ===>    a = a + ...

a *= ...    ===>    a = a * ...

etc.

 

Originally it was:

   a += ...    ===>    a = a + (...)

   a *= ...    ===>    a = a * (...)

  

The automatic parentheses only had an effect when the expression to the right of the shortcut operator contained an operator with lower precedence, with the most common example being:

 

   a += b using mask

 

Under the original rules (prior to 6.5.1708.1 / compiler 959), the mask would have been applied to b only, with the result added or concatenated to a. After the patch, the statement was compiled as:

 

   a = a + b using mask

 

where the normal rules of precedence dictate that the mask gets applied last, to the result of a + b.

To force the "using mask" operator to apply to the b argument, use parentheses:

 

   a += (b using mask)

 

The 958 patch applied only to shortcut statements containing "using" clauses. This new patch (compiler edit 970), extends that simplification to all shortcut statements, whether they contain a "using" clause or not.