array C_nextFree123 integer C_firstFree154 integer C_maxIndex897 array C_ang_rad_0162 array C_ang_rad_1148 integer C_firstFree154 = 0 integer C_maxIndex897 = 0 function initGlobals211() { C_firstFree_154 = 0; C_maxIndex_897 = 0; } function main128() { initGlobals211(); init_test612(); } function config197() { } function init_test612() { local integer c164 local real tuple_temp850 local real tuple_temp174 c_164 = new_C843(); tuple_temp_850 = 4.; C_ang_rad_set143(c_164, 0, tuple_temp_850); tuple_temp_174 = 2.; C_ang_rad_set143(c_164, 1, tuple_temp_174); if ((C_ang_rad_get149(c_164, 0) == 4.) and (C_ang_rad_get149(c_164, 1) == 2.)) { testSuccess146(); } else { }; } IS_NATIVE function testSuccess146() { } function C_init391(integer this199) { } function new_C843() returns integer { local integer this409 this_409 = alloc_C125(); construct_C185(this_409); return this_409; } function construct_C185(integer this112) { C_init391(this_112); } function alloc_C125() returns integer { local integer this190 if (C_firstFree_154 == 0) { if (C_maxIndex_897 < 32768) { C_maxIndex_897 = (C_maxIndex_897 + 1); this_190 = C_maxIndex_897; } else { error368("Out of memory: Could not create C."); this_190 = 0; }; } else { C_firstFree_154 = (C_firstFree_154 - 1); this_190 = C_nextFree_123[C_firstFree_154]; }; return this_190; } function error368(string msg158) { $debugPrint176((msg_158 + (" " + #getStackTrace()))); } function C_ang_rad_set143(integer instanceId103, integer arrayIndex476, real value762) { if ((arrayIndex_476 < 0) or (arrayIndex_476 >= 2)) { error368("Index out of Bounds"); } else { if (arrayIndex_476 <= 0) { C_ang_rad_0_162[instanceId_103] = value_762; } else { C_ang_rad_1_148[instanceId_103] = value_762; }; }; } function C_ang_rad_get149(integer index1116, integer index2409) returns real { local real returnVal164 if ((index2_409 < 0) or (index2_409 >= 2)) { error368("Index out of Bounds"); } else { if (index2_409 <= 0) { returnVal_164 = C_ang_rad_0_162[index1_116]; } else { returnVal_164 = C_ang_rad_1_148[index1_116]; }; }; return returnVal_164; }