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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fee8802cc3d8334d X-Google-Attributes: gid103376,public X-Google-Thread: 10a146,fee8802cc3d8334d X-Google-Attributes: gid10a146,public From: ppaatt@aol.com (PPAATT) Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/12 Message-ID: <19990612133845.12425.00000906@ng-bd1.aol.com>#1/1 X-Deja-AN: 488837364 References: Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada,comp.lang.java.programmer X-Admin: news@aol.com Date: 1999-06-12T00:00:00+00:00 List-Id: > truncating conversions in Java must be > explicit casts. Java casts need be explicit only if they convert a one to a sign bit or if they truncate one's. Truncating zeroes remains (yeeuck) implicit e.g. final int i = 0x7F; byte b = i; And the rules on how many sign-extension bits to add implicitly have changed for the shift operators and for the ?: if-then-else operator. Pat LaVarre p.lavarre@ieee.org http://members.aol.com/ppaatt/nqjava/