comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: printf package/Function/Procedure in Ada ??
Date: 1999/03/10
Date: 1999-03-10T00:00:00+00:00	[thread overview]
Message-ID: <7c61o6$ops$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 7c4e75$e5m@drn.newsguy.com

In article <7c4e75$e5m@drn.newsguy.com>,
  solo <solo@newsguy.com> wrote:
>
> Hello,
>
> Any one knows where one can obtain a printf package/Function written all
> in Ada?
> (i.e. without Ada interfacing to the C printf() function to do its thing).
>
> This will be a package that will have a printf procedure that
> exactly matches that of the C printf specs.

printf() takes an indeterminate amount of arguments. You can't do that in Ada.
However you can simulate it with a single argument that is an unconstrained
array.

Using that trick, along with some of the tricks and the facilities in gnat's
Spitbol.* packages, I think it'd be doable. Probably not worth the effort, but
doable.

For those of you who haven't taken a look at it, I highly reccomend playing
with the gnat Spitbol packages. There are some rather nifty coding tricks in
there that I had never thought of before. I'm certainly the richer for having
figgured out how to use it.

T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




      parent reply	other threads:[~1999-03-10  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-09  0:00 printf package/Function/Procedure in Ada ?? solo
1999-03-10  0:00 ` Tom Moran
1999-03-10  0:00   ` Corey Ashford
1999-03-10  0:00     ` Ehud Lamm
1999-03-10  0:00 ` Richard D Riehle
1999-03-10  0:00 ` robert_dewar
1999-03-10  0:00 ` dennison [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