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: G_Haddad@qm.is.lmsc.lockheed.com (George Haddad) Subject: Re: State machines and Goto's (was Re: Should internet support software be written in Ada?) Date: 1995/04/19 Message-ID: #1/1 X-Deja-AN: 101283248 sender: news@enterprise.rdd.lmsc.lockheed.com (News Administrator) references: <3kaksj$iur@isnews.calpoly.edu> <3ki9t8$c8l@Starbase.NeoSoft.COM> <3m3j73$php@tali.hsc.colorado.edu> <1995Apr7.141054.17419@sei.cmu.edu> <9511002.21479@mulga.cs.mu.OZ.AU> organization: 81-80 followup-to: comp.lang.ada newsgroups: comp.lang.ada Date: 1995-04-19T00:00:00+00:00 List-Id: In article , fjm@ti.com (Fred J. McCall) wrote: > 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. Write a local procedure in the current scope (if the common code is really large, make it "separate"). Then, if necessary for performance, INLINE it. -- I found these opinions on my doorstep, could you please give them a good home?