As designed or a bug?
Posted: Tue Jan 24, 2023 8:53 pm
In noticed some unexpected behaviour:
Results in:
I would expect for the evaluation to take place, and after that the result being assigned to all 3 values. But it looks like it's evaluated like:
Value1 := 1 + 2 + 3
Value2 := 6 + 2 + 3
Value3 := 6 + 11 + 3
Is this as designed, or is this a bug?
Code: Select all
Function Options(*DIRECT)
Define Field(#value1) Type(*INT)
Define Field(#value2) Type(*INT)
Define Field(#value3) Type(*INT)
#value1 := 1
#value2 := 2
#value3 := 3
#value1 #value2 #value3 := #value1 + #value2 + #value3
Use Builtin(MESSAGE_BOX_ADD) With_Args(('value1: &1').substitute( #value1.AsString ))
Use Builtin(MESSAGE_BOX_ADD) With_Args(('value2: &1').substitute( #value2.AsString ))
Use Builtin(MESSAGE_BOX_ADD) With_Args(('value3: &1').substitute( #value3.AsString ))
Use Builtin(MESSAGE_BOX_SHOW)
Value1 := 1 + 2 + 3
Value2 := 6 + 2 + 3
Value3 := 6 + 11 + 3
Is this as designed, or is this a bug?