comp.lang.ada
 help / color / mirror / Atom feed
From: Corey Ashford <yeroca@rocketmail.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: <36E61F72.4C68BE6C@rocketmail.com> (raw)
In-Reply-To: 36e5ee34.38268278@news.pacbell.net

Tom Moran wrote:
> 
> Isn't
>   Put("I=" & integer'image(i) & name);
> simpler than
>   printf("I=%i%s", i, name);

Except that printf allows you to more easily get fancy with formatting of
the variables, e.g. %08x, or %7.3f.  You can do this kind of thing with
text_io, but it's a lot more keystrokes.

In general, I think formatted I/O is a little more difficult in Ada, but Ada provides
many things that C can't do easily or at all (e.g. string slices, 'image for enumerated
types).

- Corey




  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 ` dennison
1999-03-10  0:00 ` Richard D Riehle
1999-03-10  0:00 ` robert_dewar
1999-03-10  0:00 ` Tom Moran
1999-03-10  0:00   ` Corey Ashford [this message]
1999-03-10  0:00     ` Ehud Lamm
replies disabled

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