cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Array definition sequence changed again.

StuartBruff
23-Emerald II

Array definition sequence changed again.

In M11 through M14 it was possible to create a 3-
vector (x y z) on the lhs of a definition and put
(5 7 x*y) on the rhs to define x,y & z.

M14 broke this, but was partially fixed by M020.
It's broke again in Spirit.

See attached.

Stuart
1 REPLY 1

>>In M11 through M14 it was possible to create a 3-
vector (x y z) on the lhs of a definition and put
(5 7 x*y) on the rhs to define x,y & z.
<<

This was always a bug introduced in MC11. The definition for parallel assignment require that the right hand side be evaluated completely before any assignments are made, and that then all the assignments are done simultaneously. Thus it should be possible to do (a b):=(b a) to interchange the values of a and b. In MC13 and 14 there is a compatibility setting to allow the erroneous MC11 behaviour to be used. Note that local assignment never had this problem, and properly evaluates in parallel in all versions.
__________________
� � � � Tom Gutman
Top Tags