From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public From: mab@dst17.wdl.loral.com (Mark A Biggar) Subject: Re: State machines and Goto's (was Re: Should internet support software be written in Ada?) Date: 1995/04/20 Message-ID: <1995Apr20.164139.22192@wdl.loral.com>#1/1 X-Deja-AN: 101283286 sender: news@wdl.loral.com references: <9511002.21479@mulga.cs.mu.OZ.AU> organization: Loral Western Development Labs newsgroups: comp.lang.ada Date: 1995-04-20T00:00:00+00:00 List-Id: In article fjm@ti.com (Fred J. McCall) writes: >In article <9511002.21479@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes: >>The alternative should not be to replicate the code, it should >>be to put the common code into a procedure or function. >And what if the common code is (relatively) large and using a (relatively) >large number of the variables used by the procedure that it is already in and >needs them to have the values which they have at the point where the >'repeated' code occurs? Presumably you propose writing a function or >procedure with 15-20 parameters? I don't consider that particularly good >practice. This may be one of the few times where the nested procedure/function ability of Ada may pay off big time. Usually I never write nested routines, ,they are amost never necesary, but if I had the above postulated situation I probably would use one. -- Mark Biggar mab@wdl.loral.com