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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6426898aedaa5880 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!out02a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Pragma for conditional compilation? (Ada 2005 vs. 95) References: <1190879769.361848.188220@22g2000hsm.googlegroups.com> <1190929570.915553.284000@19g2000hsx.googlegroups.com> <4p1jdf.ssa.ln@hunter.axlog.fr> <1190993095.488093.244130@r29g2000hsg.googlegroups.com> <1v8jdf.rc4.ln@hunter.axlog.fr> <1191002053.9585.66.camel@kartoffel> <46FD45BA.5030205@obry.net> <20070928220239.66807172@cube.tz.axivion.com> From: Stephen Leake Date: Sat, 29 Sep 2007 06:24:46 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:SbascSQxvTfXQ2Jnefg2HMa7noI= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 9e32b46fe27ede05e48ed15718 Xref: g2news2.google.com comp.lang.ada:2216 Date: 2007-09-29T06:24:46-04:00 List-Id: Stefan Bellon writes: > On Fri, 28 Sep, Pascal Obry wrote: > >> case OS is >> when "Windows_NT" => >> for Implementation ("OS_Services") >> use "os_services__win32.adb"; >> when "UNIX" => >> for Implementation ("OS_Services") >> use "os_services__linux.adb"; >> end case; > > Interesting. What is the difference to the following (what we have been > using for some time)? > > package Naming is > case OS is > when "UNIX" => > for Body ("Plugins.Internal_Load") > use "plugins-internal_load-unix.adb"; > when "Windows_NT" => > for Body ("Plugins.Internal_Load") > use "plugins-internal_load-windows.adb"; > end case; > end Naming; > > The two Internal_Load being "separate" procedures for package body > Plugins. > > Are the pros and cons versus the Implementation attribute above (which > I didn't know about until now)? The gnat reference manual (_not_ the gnat user guide) says, in section 13.13.1 Package Naming: `Implementation' This is a synonym of `Body'. So the real difference is in the double underscore. -- -- Stephe