comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: Suggestion for gnatstub
Date: Thu, 14 Nov 2002 20:10:21 GMT
Date: 2002-11-14T20:10:21+00:00	[thread overview]
Message-ID: <3DD4032D.5030909@attbi.com> (raw)
In-Reply-To: u8z01byub.fsf@wanadoo.fr

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...





      parent reply	other threads:[~2002-11-14 20:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 11:14 Suggestion for gnatstub Victor Porton
2002-11-08 12:56 ` Marc A. Criley
2002-11-08 13:23   ` Marin David Condic
2002-11-08 21:09     ` chris.danx
2002-11-15 17:08       ` Wes Groleau
2002-11-15 17:35         ` Stephen Leake
2002-11-16 14:36         ` Marin David Condic
2002-11-09 14:15     ` Simon Wright
2002-11-09 14:50       ` Marin David Condic
2002-11-09 20:05         ` Simon Wright
2002-11-10 15:58           ` Marin David Condic
2002-11-10 20:31             ` Robert A Duff
2002-11-11 13:46               ` Marin David Condic
2002-11-11 15:31                 ` Robert A Duff
2002-11-11 20:32                   ` Randy Brukardt
2002-11-11  6:31             ` Simon Wright
2002-11-09 15:44       ` Robert A Duff
2002-11-09 20:08         ` Simon Wright
2002-11-09 21:56           ` Robert A Duff
2002-11-10  8:42             ` Pascal Obry
2002-11-10 12:20               ` Simon Wright
2002-11-10 16:04               ` Marin David Condic
2002-11-14 20:10               ` Robert I. Eachus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox