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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Rules for Representation of Subtypes Date: 1996/09/26 Message-ID: <01bbab94$8a542360$228371a5@dhoossr.iquest.com>#1/1 X-Deja-AN: 185444103 distribution: world references: <01bba947$d8990620$188371a5@dhoossr.iquest.com> <32474889.6EEA@gsde.hso.link.com> content-type: text/plain; charset=ISO-8859-1 organization: DBH Enterprises, Inc. mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-26T00:00:00+00:00 List-Id: Samuel T. Harris wrote in article <32474889.6EEA@gsde.hso.link.com>... > David C. Hoos, Sr. wrote: > > i.e., write: > > > > read (fd, A_Small_Integer'Address, A_Small_Integer'Size / > > System.Storage_Unit); > > > > More safe (in a general sense) is ... > > (A_Small_Integer'Size + System.Storage_Unit - 1) / System.Storage_Unit > > ... to handle those rare weird-sized entities with > involve non-zero remainders to the poster's division. You're absolutely correct, and I always code it that way. Why I didn't put it in my posting is probably because I don't desk-check e-mail and newsgroup postings like I do real code -- with marker in hand and hard copy. -- David C. Hoos, Sr., http://www.dbhwww.com http://www.ada95.com