A programming language created by Microsoft that serves a stepping stone for beginners from block-based coding languages to more complex text-based languages.
It seems that the interpreter is working from right to left and the "=" is grabbing an element.
case4:
Stack.PushValue("n",1)
Stack.PushValue("n",2)
Stack.PushValue("n",3)
Stack.PushValue("n",4)
Stack.PushValue("n","result4")
testn[Stack.PopValue("n")][Stack.PopValue("n")] = Stack.PopValue("n")
TextWindow.WriteLine(testn[2][3]) ' -> Prints "result" '
TextWindow.WriteLine("Stackcount: " + Stack.GetCount("n"))
TextWindow.WriteLine("and the element is: " + Stack.PopValue("n")) ' ->
TextWindow.WriteLine("Stackcount: " + Stack.GetCount("n")) ' ->
Conclusion:
When writing to a multidimensional array and using at least one STACK.PopValue() in the index, the stack counter is erroneously decremented before use.