globalvar MyClass[] array = [...];
rule: 'x'
if (array.Length > 0)
{
array[0].DoSomething();
MinWait();
LoopIfConditionIsTrue();
}
class MyClass
{
public void DoSomething()
{
ModifyVariable(root.array, Operation.RemoveFromArray, this);
delete this;
}
}
Doing something like this will have unexpected results since this is the array element and that array element is being removed with the modify.
This is not an issue if DoSomething is a subroutine.
Doing something like this will have unexpected results since
this
is the array element and that array element is being removed with the modify. This is not an issue ifDoSomething
is a subroutine.