array Pair_nextFree778 integer Pair_firstFree883 integer Pair_maxIndex138 array Pair_a357 integer Pair_firstFree883 = 0 integer Pair_maxIndex138 = 0 function initGlobals142() { } function main133() { initGlobals142(); init_test550(); } function config158() { } function init_test550() { local integer p165 p_165 = new_Pair246(); Pair_a_357[p_165] = 4; if (Pair_a_357[p_165] == 4) { testSuccess114(); } else { testFail155("Array Test 1 failed."); }; } IS_NATIVE function testSuccess114() { } IS_NATIVE function testFail155(string msg112) { } function new_Pair246() returns integer { local integer this603 local integer this155 if (Pair_firstFree_883 == 0) { if (Pair_maxIndex_138 < 32768) { Pair_maxIndex_138 = (Pair_maxIndex_138 + 1); this_155 = Pair_maxIndex_138; } else { error147("Out of memory: Could not create Pair."); this_155 = 0; }; } else { Pair_firstFree_883 = (Pair_firstFree_883 - 1); this_155 = Pair_nextFree_778[Pair_firstFree_883]; }; this_603 = this_155; return this_603; } function error147(string msg538) { $debugPrint190((msg_538 + (" " + #getStackTrace()))); }