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,a96b706fab1e8c2c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 10:55:29 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!chcgil2-snf1.gtei.net!news.gtei.net!newspump.sol.net!nntp.msen.com!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Binary value Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Mon, 2 Apr 2001 17:54:42 GMT References: <9e2x6.568987$JT5.15730002@news20.bellglobal.com> <9a2dnu$sff$1@nh.pace.co.uk> <3AC8AC34.CDEEB50F@boeing.com> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:6366 Date: 2001-04-02T17:54:42+00:00 List-Id: Jeffrey Carter writes: > Ignoring the question of what the correct algorithm is, why would you > want to implement this (specific to binary) algorithm, when Text_IO > already provides this capability for any base from 2 to 16? It's much > easier and more flexible to use Text_IO.Integer_IO.Put and extract the > part of the result between the '#'s. Good point, but I can think of a couple of reasons why someone might want to avoid using Text_IO at all: it's big (which matters if you care about space, and don't have a clever linker), and it's not pragma-Pure. I'd recommend 'Image and 'Value rather than Text_IO, even though they have their faults, too. - Bob