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,6cc2d0131145e263,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-09 10:21:07 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!news-east.rr.com!news-west.rr.com!lsnws01.we.mediaone.net!cyclone-LA3.rr.com!typhoon.san.rr.com.POSTED!not-for-mail Message-ID: <3B72C23E.62F7B3D2@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Question about "for X'Size use ..." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 09 Aug 2001 17:02:54 GMT NNTP-Posting-Host: 24.165.21.192 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 997376574 24.165.21.192 (Thu, 09 Aug 2001 10:02:54 PDT) NNTP-Posting-Date: Thu, 09 Aug 2001 10:02:54 PDT Xref: archiver1.google.com comp.lang.ada:11694 Date: 2001-08-09T17:02:54+00:00 List-Id: Let's say I declare type Blah is mod 2**12; for Blah'Size use 12; Does that "for use" clause actually do anything? I.e., what does that really mean on a CPU with 8-bit bytes? It doesn't change the size of registers. Does it affect how things are written to streams? I understand that if I pack an array or record or whatever, it makes a difference. But is the compiler going to generate different code if a Blah never winds up in an array or record or whatever? Will it be stored in (say) a 16-bit location where it might be more efficient to use a full 32 bits? What if I say type Blah is mod 2**12; for Blah'Size use 64; Does this have any effect? Is any compiler going to refuse to compile those statements because it only has 32-bit registers? TIA! -- Darren New / Senior MTS & Free Radical / Invisible Worlds Inc. San Diego, CA, USA (PST). Cryptokeys on demand. dnew@san.rr.com "You probably noticed you can't breath underwater. Hence the tank." -- PADI instruction manual, page 107.