array A_nextFree184 integer A_firstFree116 integer A_maxIndex101 integer wurst_stack_depth173 array wurst_stack823 array A_ints_0141 array A_ints_1189 array A_ints_2559 array A_ints_3210 integer A_firstFree116 = 0 integer A_maxIndex101 = 0 integer wurst_stack_depth173 = 0 function initGlobals660() { } function main977() { initGlobals660(); init_test813("when calling init_test in arrayAttributeTest1, line 1"); } function config125() { } function init_test813(string __wurst_stackPos479) { local integer this402 wurst_stack_823[wurst_stack_depth_173] = __wurst_stackPos_479; wurst_stack_depth_173 = (wurst_stack_depth_173 + 1); wurst_stack_823[wurst_stack_depth_173] = "when calling new_A in arrayAttributeTest1, line 8"; wurst_stack_depth_173 = (wurst_stack_depth_173 + 1); wurst_stack_823[wurst_stack_depth_173] = "when calling alloc_A in arrayAttributeTest1, line 5"; wurst_stack_depth_173 = (wurst_stack_depth_173 + 1); if (A_firstFree_116 == 0) { if (A_maxIndex_101 < 32768) { A_maxIndex_101 = (A_maxIndex_101 + 1); this_402 = A_maxIndex_101; } else { error157("Out of memory: Could not create A.", "when calling error in arrayAttributeTest1, line 5"); this_402 = 0; }; } else { A_firstFree_116 = (A_firstFree_116 - 1); this_402 = A_nextFree_184[A_firstFree_116]; }; wurst_stack_depth_173 = ((wurst_stack_depth_173 - 1) - 1); A_ints_set104(this_402, 0, 1234, "when writing array A_ints in arrayAttributeTest1, line 9"); if (A_ints_get188(this_402, 0, "when reading array A_ints in in arrayAttributeTest1, line 10") == 1234) { testSuccess223(); } else { testFail199("wrong value"); }; wurst_stack_depth_173 = (wurst_stack_depth_173 - 1); } IS_NATIVE function testSuccess223() { } IS_NATIVE function testFail199(string msg339) { } function error157(string msg211, string __wurst_stackPos699) { local integer stacktraceIndex964 local integer stacktraceLimit214 wurst_stack_823[wurst_stack_depth_173] = __wurst_stackPos_699; wurst_stack_depth_173 = (wurst_stack_depth_173 + 1); __wurst_stackPos_699 = ""; stacktraceIndex_964 = wurst_stack_depth_173; stacktraceLimit_214 = 0; loop { stacktraceIndex_964 = (stacktraceIndex_964 - 1); stacktraceLimit_214 = (stacktraceLimit_214 + 1); exitwhen ((stacktraceLimit_214 > 20) or (stacktraceIndex_964 < 0)); __wurst_stackPos_699 = (__wurst_stackPos_699 + (" " + wurst_stack_823[stacktraceIndex_964])); }; $debugPrint355((msg_211 + (" " + __wurst_stackPos_699))); wurst_stack_depth_173 = (wurst_stack_depth_173 - 1); } function A_ints_set104(integer instanceId113, integer arrayIndex101, integer value196, string stackPos174) { if ((arrayIndex_101 < 0) or (arrayIndex_101 >= 4)) { error157("Index out of Bounds", stackPos_174); } else { if (arrayIndex_101 <= 1) { if (arrayIndex_101 <= 0) { A_ints_0_141[instanceId_113] = value_196; } else { A_ints_1_189[instanceId_113] = value_196; }; } else { if (arrayIndex_101 <= 2) { A_ints_2_559[instanceId_113] = value_196; } else { A_ints_3_210[instanceId_113] = value_196; }; }; }; } function A_ints_get188(integer index1186, integer index2197, string stackPos861) returns integer { local integer returnVal132 if ((index2_197 < 0) or (index2_197 >= 4)) { error157("Index out of Bounds", stackPos_861); } else { if (index2_197 <= 1) { if (index2_197 <= 0) { returnVal_132 = A_ints_0_141[index1_186]; } else { returnVal_132 = A_ints_1_189[index1_186]; }; } else { if (index2_197 <= 2) { returnVal_132 = A_ints_2_559[index1_186]; } else { returnVal_132 = A_ints_3_210[index1_186]; }; }; }; return returnVal_132; }