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: mario@klebsch.de (Mario Klebsch) Subject: Re: Function Calls by Address Date: 1999/09/04 Message-ID: #1/1 X-Deja-AN: 521043196 References: <37CADE68.6AF06F5D@escmail.orl.lmco.com> <37CEEFFA.7D73F78D@magic.fr> <7qooh7$hbh$1@nnrp1.deja.com> <37CFFEA6.921CBE59@magic.fr> Organization: IRD InterNet Services GmbH Newsgroups: comp.lang.ada Date: 1999-09-04T00:00:00+00:00 List-Id: Francois Godme writes: >I knew about the nested procedures restriction but thought that no one >still uses nested procedures. Personally, I have stopped using them. Why >will I hide a perfectly useful procedure inside another when all I want >is to spare me rewriting over and over the same thing. Althoug I do not program in Ada (yet), I really like nested procedures. I learned to use them in PASCAL, and a few Years ago, when I did a Project in Modula II, i was able to use them, again. The Idea behind them is, to make everything as local as possible, w.g. to avoid namespace pollution. ANd there are a lot of nice things, you only can to that elegant with nested procedures. Nested procedures have full access to all local variables of the enclosing procedures. If you want to do it in C, you have to use static variables and will loose reentrancy. 73, Mario -- Mario Klebsch mario@klebsch.de