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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,496108d9dbc25896 X-Google-Attributes: gid103376,public From: Corey Ashford Subject: Re: printf package/Function/Procedure in Ada ?? Date: 1999/03/10 Message-ID: <36E61F72.4C68BE6C@rocketmail.com>#1/1 X-Deja-AN: 453303923 Content-Transfer-Encoding: 7bit References: <7c4e75$e5m@drn.newsguy.com> <36e5ee34.38268278@news.pacbell.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Rational Software Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-10T00:00:00+00:00 List-Id: 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