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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ded6ba3fc5b87b66,start X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: First time Ada has let me down Date: 2000/10/24 Message-ID: #1/1 X-Deja-AN: 685530108 Sender: kst@king.cts.com References: <8FD7DEBEEsynoptikdamudderfuck@news> <3A46E0A5.6C9EC5FD@telepath.com> X-Trace: thoth.cts.com 972451434 89038 205.163.0.22 (25 Oct 2000 05:23:54 GMT) Organization: CTSnet Internet Services Newsgroups: comp.lang.ada X-Complaints-To: abuse@cts.com Date: 2000-10-24T00:00:00+00:00 List-Id: Ted Dennison writes: [...] > "typecasting"? No such thing in Ada. Integer types are convertable to each > other, but that's a simple operation that generates *no* code (except > sometimes a range check, which you can disable if you need to). A record rep > clause does seem a good way to go, but there are probably others. A conversion from a smaller to a larger signed integer type is likely to require code to do the sign extension; likewise zero extension for modular types. Also, any conversion with differing sizes may require code to copy the bits from one object to another, though this might be optimized out depending on how the result is used. (OTOH, the copying is often considered part of an assignment, not part of the conversion itself.) -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Welcome to the last year of the 20th century.