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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,34872f3f22b5b140 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-14 12:10:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn14feed!wn13feed!wn11feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!sccrnsc04.POSTED!not-for-mail Message-ID: <3DD4032D.5030909@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Suggestion for gnatstub References: <3dcb9e51$0$303$bed64819@news.gradwell.net> <3DCBC4C9.AD436CD9@earthlink.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.61.239.24 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc04 1037304621 24.61.239.24 (Thu, 14 Nov 2002 20:10:21 GMT) NNTP-Posting-Date: Thu, 14 Nov 2002 20:10:21 GMT Organization: AT&T Broadband Date: Thu, 14 Nov 2002 20:10:21 GMT Xref: archiver1.google.com comp.lang.ada:30902 Date: 2002-11-14T20:10:21+00:00 List-Id: Pascal Obry wrote: > Not only limited types but with unconstraint types like String which is > very common ! I used to have this problem until I realized a trick. It shouldn't be necessary, but it works: function F(X, Y: Integer) return GNAT.Socket_Type is type Junk is access GNAT.Socket_Type; Junk_Reference: Junk; begin TBD("F(X, Y: Integer) return GNAT.Socket_Type"); return Junk_Reference.all; end F; The procedure TBD in package Incomplete normally prints a message: procedure TBD(S: in String) is begin Put_Line(S & " not yet implemented."); end TBD; There are also a couple of useful functional forms returning Strings, Integers, Floats, and Booleans: function TBD(S: in String) return String is begin Put_Line(S & " not yet implemented."); return S; end TBD; One of the reasons I like this approach is that any library unit body that is unfinished needs a "with Incomplete; use Incomplete;" to compile without errors...