Closed FredrikLindgren closed 4 years ago
@FredrikLindgren
Unless I'm missing something, ACTION_CLEAR_ARRAY "array" // or CLEAR_ARRAY "array"
is a valid way to initialize an array.
As a result, if you execute that command, you won't get the error message linked above.
I cannot reproduce such behaviour with WeiDU 246 and there is nothing in the implementation of *CLEAR_ARRAY that suggests it would "initialise" an array. Regardless, as of whichever commit it was, WeiDU no longer fails on uninitialised return arrays.
... and there is nothing in the implementation of *CLEAR_ARRAY that suggests it would "initialise" an array.
Yeah, sorry, you're right.
Anyway, you can reproduce this issue by launching this function
DEFINE_ACTION_FUNCTION test
RET_ARRAY
foo
BEGIN
ACTION_CLEAR_ARRAY "foo"
ACTION_IF 0 BEGIN
OUTER_SET $foo(1) = 90
END
END
http://forums.pocketplane.net/index.php/topic,29828.0.html