array C_nextFree312 integer C_firstFree136 integer C_maxIndex152 array C_ang_rad_0821 array C_ang_rad_1163 integer C_firstFree136 = 0 integer C_maxIndex152 = 0 function initGlobals122() { } function main916() { initGlobals122(); init_test881(); } function config451() { } function init_test881() { local integer c155 c_155 = new_C145(); C_ang_rad_set131(c_155, 0, 4.); C_ang_rad_set131(c_155, 1, 2.); if ((C_ang_rad_get241(c_155, 0) == 4.) and (C_ang_rad_get241(c_155, 1) == 2.)) { testSuccess172(); } else { }; } IS_NATIVE function testSuccess172() { } function C_init156(integer this171) { } function new_C145() returns integer { local integer this457 this_457 = alloc_C126(); construct_C203(this_457); return this_457; } function construct_C203(integer this980) { C_init156(this_980); } function alloc_C126() returns integer { local integer this144 if (C_firstFree_136 == 0) { if (C_maxIndex_152 < 32768) { C_maxIndex_152 = (C_maxIndex_152 + 1); this_144 = C_maxIndex_152; } else { error110("Out of memory: Could not create C."); this_144 = 0; }; } else { C_firstFree_136 = (C_firstFree_136 - 1); this_144 = C_nextFree_312[C_firstFree_136]; }; return this_144; } function error110(string msg164) { $debugPrint810((msg_164 + (" " + #getStackTrace()))); } function C_ang_rad_set131(integer instanceId139, integer arrayIndex110, real value464) { if ((arrayIndex_110 < 0) or (arrayIndex_110 >= 2)) { error110("Index out of Bounds"); } else { if (arrayIndex_110 <= 0) { C_ang_rad_0_821[instanceId_139] = value_464; } else { C_ang_rad_1_163[instanceId_139] = value_464; }; }; } function C_ang_rad_get241(integer index1373, integer index2102) returns real { local real returnVal199 if ((index2_102 < 0) or (index2_102 >= 2)) { error110("Index out of Bounds"); } else { if (index2_102 <= 0) { returnVal_199 = C_ang_rad_0_821[index1_373]; } else { returnVal_199 = C_ang_rad_1_163[index1_373]; }; }; return returnVal_199; }