rusty
rusty copied to clipboard
ADD function with initialized values leads to panicked
example
PROGRAM mainProg
VAR
X, Y, Z, Res1, Res2: REAL;
END_VAR
Z := ADD(IN1 := Res1, IN2 := Res2); //not ok, generates the error below
Z := ADD(Res1, Res2); // OK
;
END_PROGRAM
thread 'RUST_BACKTRACE=1 environment variable to display a backtrace
Due to the variadic nature of ADD and MUL, formal parameter assignment might be an issue since the args are not named IN1, IN2, ... but rather are passed as an array named IN. If this functionality is required, we might have to add some code to translate the n in INn to a corresponding index.
@ghaith any thoughts on this?