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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,2f6e39a9d25bcd8b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder.news-service.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: how to organize source code for a complete software? Thanks! Date: Sun, 09 Oct 2011 23:24:46 +0200 Organization: A noiseless patient Spider Message-ID: <4E92111E.4000500@adalog.fr> References: <9fe53iFoe7U1@mid.individual.net> <878vouovt4.fsf@ludovic-brenta.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="cJo7kSTQUrCFv2/D8KKtqw"; logging-data="12952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WzpHwnBSNkLDIlXKkZYwx" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: <878vouovt4.fsf@ludovic-brenta.org> Cancel-Lock: sha1:djf3iP/i5l3leUoU14iCydT5omE= Xref: g2news1.google.com comp.lang.ada:21342 Date: 2011-10-09T23:24:46+02:00 List-Id: Le 09/10/2011 20:37, Ludovic Brenta a �crit : > OK but where do you place variables that are shared by multiple > subroutines or functions? Where do you place type declarations? This > is quite crucial for my point below. In Fortran, you would place them in Common blocks. You can have the same effect in Ada by having packages that contain only (types and) variables. I'm not saying it is recommended practice in Ada, although some design methods (SA) lead you to group subprograms on one side and data on the other side. Of course, the OO wave does the opposite (group related subprograms and data). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a d�m�nag� / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00