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,2e1cd42feeec2424 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!news.cs.univ-paris8.fr!newsfeed.vmunix.org!feed.news.tiscali.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Tue, 08 Feb 2005 19:43:42 +0100 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Interfacing to C References: <1107886078.800063.121210@f14g2000cwb.googlegroups.com> In-Reply-To: <1107886078.800063.121210@f14g2000cwb.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42090861$0$18555$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 08 Feb 2005 19:43:45 MET NNTP-Posting-Host: e6c682f8.newsread4.arcor-online.net X-Trace: DXC=>TAI?S>9dTBSZ`lLL_hK=J:ejgIfPPldDjW\KbG]kaMHAV6U:Z=fE=O?kaliLGR5R@UUng9_FXZ=C>:=P9Ihe`BH@Z?dZ]MOidE X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8193 Date: 2005-02-08T19:43:45+01:00 List-Id: Garry wrote: > -- Start of hsdbg.ads > -- > with Interfaces.C; > with Interfaces.C.Strings; > > package HSDBG is > -- Dummy procedure? > type DUMB is digits 5 range 0.0 .. 1.0E10; > procedure DUMMY (B : DUMB); > -- End Dummy procedure > procedure marktime(Variable : Interfaces.C.Strings.chars_ptr); > pragma Import(C, marktime, "marktime"); > end HSDBG; > -- End of hsdbg.ads > You don't need a dummy procedure, and according to the spec you do not need a body either. The reason is that in general a body is there to complete the declarations in the spec. As the only subprogram in the spec, "marktime", is imported, there is nothing to complete in this sense. Now to require a body, the Ada LRM has this to say (Section 7.2) pragma Elaborate_Body can be used to require a library_unit_declaration to have a body, ... if it would not otherwise require one. -- Georg