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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cc3cbcb42a365f38,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newsgate.cistron.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!tornado.fastwebnet.it!53ab2750!not-for-mail From: Abbo User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: it, it-it, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: How casting works in ada? Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 23 Nov 2004 18:26:12 +0100 NNTP-Posting-Host: 23.252.122.241 X-Complaints-To: newsmaster@fastweb.it X-Trace: tornado.fastwebnet.it 1101230839 23.252.122.241 (Tue, 23 Nov 2004 18:27:19 CET) NNTP-Posting-Date: Tue, 23 Nov 2004 18:27:19 CET Xref: g2news1.google.com comp.lang.ada:6383 Date: 2004-11-23T18:26:12+01:00 List-Id: 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. Example: type one is delta 0.003 range -20.0 .. 200.0; type two is digits 6 range -10.0 .. 400.0; type three is delta 0.0023142 range -200.0.. 9999.0; VAR1 : one := 23.0; VAR2 : two; VAR3 : three; VAR2 := two ( VAR1 ); VAR3 := three (VAR1); which values are in VAR2 and VAR3 and how ADA calculates it? Why VAR2 := two(23.0); gives different value for VAR2 from VAR2 := two ( VAR1 ); ?? Thanks in advance!!