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-Thread: 103376,245c84afd1e393ce X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: What about big integers in Ada 2005? Date: 04 Oct 2005 12:10:10 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1581461.uQ1jN63t33@linux1.krischik.com> <5mo0f.529$B14.97@newssvr11.news.prodigy.com> <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1128442210 31825 192.74.137.71 (4 Oct 2005 16:10:10 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 4 Oct 2005 16:10:10 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:5378 Date: 2005-10-04T12:10:10-04:00 List-Id: clubley@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley) writes: > In article <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net>, "Dmitry A. Kazakov" writes: > > > > Curious, why somebody would like to use BCD for 45!? I cannot imagine any > > use of BCD except than to speed up conversions to ASCII, which is not an > > issue in these days. > > One reason to use BCD is because it's a compact data representation. Heh? Binary is more compact that BCD. I think the only reason to use BCD these days (instead of binary) is to interface to something that uses BCD. In the old days, another reason was to avoid the cost of converting strings to binary integers and vice-versa, but that seems like an obsolete reason at this Am I right? > One real world use of BCD that I have come across is in SMS messages where > it is used to encode all the SMS message centre/destination/originating > telephone numbers in the SMS TPDU packets. (Details in SMS specification > GSM 03.40). But one does not normally do arithmetic on telephone numbers, so considering them "numbers" is questionable. You could do it this way: type Digit is ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); type Phone_Number is array (...) of Digit; for Phone_Number'Component_Size use 4; - Bob