Using the AEC_MODL macro code as an example I discovered a small mystery. In the 'function door_main(act, precord, parguments)' menu the code assigns 'd: pdoor_type' as 'd := addr (g_d);' where 'g_d' is an interface level global record variable. All calls to other menus are activated using a call procedure such as:
and assign 'd' with the code 'd := pdoortype (parguments);
My question is why is setargs() used to call each successor menu rather than doing a direct assignment using 'd := addr (g_d);' as inthe first level menu?
Code: Select all
procedure call_door_unit_data(pw: pdoor_type; var iwant : wanttype);
begin
setargs(pw);
iwant := XdoorUnitData;
end;
and assign 'd' with the code 'd := pdoortype (parguments);
My question is why is setargs() used to call each successor menu rather than doing a direct assignment using 'd := addr (g_d);' as inthe first level menu?
Joe
User since V2.4
User since V2.4