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!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr14.news.prodigy.com.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada References: <1581461.uQ1jN63t33@linux1.krischik.com> <5mo0f.529$B14.97@newssvr11.news.prodigy.com> <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net> Subject: Re: What about big integers in Ada 2005? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: NNTP-Posting-Host: 64.164.117.94 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr14.news.prodigy.com 1128452180 ST000 64.164.117.94 (Tue, 04 Oct 2005 14:56:20 EDT) NNTP-Posting-Date: Tue, 04 Oct 2005 14:56:20 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: FKPGW^WETZSMB_DX]BCBNWX@RJ_XPDLMN@GZ_GYO^RR@ETUCCNSKQFCY@TXDX_WHSVB]ZEJLSNY\^J[CUVSA_QLFC^RQHUPH[P[NRWCCMLSNPOD_ESALHUK@TDFUZHBLJ\XGKL^NXA\EVHSP[D_C^B_^JCX^W]CHBAX]POG@SSAZQ\LE[DCNMUPG_VSC@VJM Date: Tue, 04 Oct 2005 18:56:20 GMT Xref: g2news1.google.com comp.lang.ada:5384 Date: 2005-10-04T18:56:20+00:00 List-Id: "Robert A Duff" wrote in message news:wccr7b1clr7.fsf@shell01.TheWorld.com... > writes: > > > BCD, and its cousins, including packed decimal, are used widely in the > > business data processing world. Files are stored in these formats. At > > present, it is rather a nuisance to try to use Ada for reading these files. > > Not impossible, but not convenient either. > > But Ada _does_ support packed decimal -- see F.1(2). > > By the way, what's the difference between packed decimal and BCD > -- I thought they were the same thing. (...shows how much I know > about business data processing) > BCD was originally a six bit (where 7 was a parity bit) representation. With the advent of the byte on the IBM System 360, BCD became Extended Binary Coded Decimal Interchange Code (EBCDIC). In COBOL for the 360, we had several Picture clauses available. 05 Item-1 PICTURE XXX . which would be represented by EBCDIC 05 Number PICTURE S99999. which would also be EBCDIC 05 Hnumber PICTURE S99999 Usage Comp-3. which would be packed decimal. COMP-3 represented the numeric PICTURE by using a half-byte (nibble) for each 9 in the picture and a nibble for the sign. In the example shown, Hnumber would occupy only three bytes where Number would occupy five bytes. In both cases, the high-order nibble is used for the sign. There are actually some additional formats available including USAGE COMPUTATIONAL which is the same as representing a value in pure binary within the size of a word. I could write for a couple of hours on this topic, but I think this gets the gist of the issue. The central problem is that business data processing people use all of these formats at one time or another. Richard Riehle