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,cc3cbcb42a365f38 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How casting works in ada? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 23 Nov 2004 19:17:40 GMT NNTP-Posting-Host: 63.184.105.77 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1101237460 63.184.105.77 (Tue, 23 Nov 2004 11:17:40 PST) NNTP-Posting-Date: Tue, 23 Nov 2004 11:17:40 PST Xref: g2news1.google.com comp.lang.ada:6392 Date: 2004-11-23T19:17:40+00:00 List-Id: Abbo wrote: > Hello! SOrry for this very basic question, but I'd like to know what > happen during a simple casting between types with different size/delta. Ada does not have casting. The ARM index entry for "cast" reads cast See type conversion 4.6(1) See unchecked type conversion 13.9(1) AFAICT, this is the only place that "cast" appears in the ARM. The answer to your question is not simple. See ARM 3.5.9(8) for information about how fixed-point types are represented. Loss of expected precision in fixed-point types with deltas that are not a power of 2 is common. -- Jeff Carter "We use a large, vibrating egg." Annie Hall 44