array A_nextFree195 integer A_firstFree977 integer A_maxIndex398 integer wurst_stack_depth128 array wurst_stack501 array A_ints_0118 array A_ints_1116 array A_ints_2940 array A_ints_3676 integer A_firstFree977 = 0 integer A_maxIndex398 = 0 integer wurst_stack_depth128 = 0 function initGlobals891() { } function main101() { initGlobals891(); init_test669("when calling init_test in arrayAttributeTest1, line 1"); } function config739() { } function init_test669(string __wurst_stackPos158) { local integer this718 wurst_stack_501[wurst_stack_depth_128] = __wurst_stackPos_158; wurst_stack_depth_128 = (wurst_stack_depth_128 + 1); wurst_stack_501[wurst_stack_depth_128] = "when calling new_A in arrayAttributeTest1, line 8"; wurst_stack_depth_128 = (wurst_stack_depth_128 + 1); wurst_stack_501[wurst_stack_depth_128] = "when calling alloc_A in arrayAttributeTest1, line 5"; wurst_stack_depth_128 = (wurst_stack_depth_128 + 1); if (A_firstFree_977 == 0) { if (A_maxIndex_398 < 32768) { A_maxIndex_398 = (A_maxIndex_398 + 1); this_718 = A_maxIndex_398; } else { error264("Out of memory: Could not create A.", "when calling error in arrayAttributeTest1, line 5"); this_718 = 0; }; } else { A_firstFree_977 = (A_firstFree_977 - 1); this_718 = A_nextFree_195[A_firstFree_977]; }; wurst_stack_depth_128 = ((wurst_stack_depth_128 - 1) - 1); A_ints_set199(this_718, 0, 1234, "when writing array A_ints in arrayAttributeTest1, line 9"); if (A_ints_get157(this_718, 0, "when reading array A_ints in in arrayAttributeTest1, line 10") == 1234) { testSuccess110(); } else { testFail102("wrong value"); }; wurst_stack_depth_128 = (wurst_stack_depth_128 - 1); } IS_NATIVE function testSuccess110() { } IS_NATIVE function testFail102(string msg120) { } function error264(string msg158, string __wurst_stackPos107) { local integer stacktraceIndex145 local integer stacktraceLimit122 wurst_stack_501[wurst_stack_depth_128] = __wurst_stackPos_107; wurst_stack_depth_128 = (wurst_stack_depth_128 + 1); __wurst_stackPos_107 = ""; stacktraceIndex_145 = wurst_stack_depth_128; stacktraceLimit_122 = 0; loop { stacktraceIndex_145 = (stacktraceIndex_145 - 1); stacktraceLimit_122 = (stacktraceLimit_122 + 1); exitwhen ((stacktraceLimit_122 > 20) or (stacktraceIndex_145 < 0)); __wurst_stackPos_107 = (__wurst_stackPos_107 + (" " + wurst_stack_501[stacktraceIndex_145])); }; $debugPrint172((msg_158 + (" " + __wurst_stackPos_107))); wurst_stack_depth_128 = (wurst_stack_depth_128 - 1); } function A_ints_set199(integer instanceId110, integer arrayIndex483, integer value134, string stackPos142) { if ((arrayIndex_483 < 0) or (arrayIndex_483 >= 4)) { error264("Index out of Bounds", stackPos_142); } else { if (arrayIndex_483 <= 1) { if (arrayIndex_483 <= 0) { A_ints_0_118[instanceId_110] = value_134; } else { A_ints_1_116[instanceId_110] = value_134; }; } else { if (arrayIndex_483 <= 2) { A_ints_2_940[instanceId_110] = value_134; } else { A_ints_3_676[instanceId_110] = value_134; }; }; }; } function A_ints_get157(integer index1183, integer index2867, string stackPos315) returns integer { local integer returnVal188 if ((index2_867 < 0) or (index2_867 >= 4)) { error264("Index out of Bounds", stackPos_315); } else { if (index2_867 <= 1) { if (index2_867 <= 0) { returnVal_188 = A_ints_0_118[index1_183]; } else { returnVal_188 = A_ints_1_116[index1_183]; }; } else { if (index2_867 <= 2) { returnVal_188 = A_ints_2_940[index1_183]; } else { returnVal_188 = A_ints_3_676[index1_183]; }; }; }; return returnVal_188; }