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,88e7ef9008757431 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Function Calls by Address Date: 1999/09/05 Message-ID: #1/1 X-Deja-AN: 521522931 References: <37CADE68.6AF06F5D@escmail.orl.lmco.com> <37CEEFFA.7D73F78D@magic.fr> <7qooh7$hbh$1@nnrp1.deja.com> <37CFFEA6.921CBE59@magic.fr> <7qsrtj$9lp$1@nnrp1.deja.com> <37D2F41D.AE1C85F5@magic.fr> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 936586226 227 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-05T00:00:00+00:00 List-Id: On Mon, 6 Sep 1999, Francois Godme wrote: > There are two kinds of nested procedures: the ones which do not make > uplevel references and the others which do. You gain possible reuses by > unnesting the former. I generally don't nest when there are no uplevel references. > You gain clarity by rewritting the latter to avoid the uplevel references. I find it much clearer when subprograms have few arguments. I speak from my experience here, as a C programmer :-). The ability to nest subprograms is a very good thing, for all of the reasons mentioned, and because it leads to clearer programs. > All the hidden parameters as well as their > passing modes are then shown. What was previously written has a function > is now correctly expressed as a procedure if for example one uplevel > reference was modified. Correctness has nothing to do with it. Do you consider any side-effecting of global (package level) variables in a function incorrect? -- Brian