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,d17561d7e5eba62c X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: An alternative to Unchecked Conversion Date: 1999/12/17 Message-ID: <385a55dd_4@news1.prserv.net>#1/1 X-Deja-AN: 561972941 Distribution: world Content-transfer-encoding: 7bit References: <38596575_4@news1.prserv.net> <3859701a@rsl2.rslnet.net> <3859a3ad_2@news1.prserv.net> Content-Type: text/plain; charset="US-ASCII" X-Complaints-To: abuse@prserv.net X-Trace: 17 Dec 1999 15:25:17 GMT, 32.101.8.182 Organization: Global Network Services - Remote Access Mail & News Services Mime-version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-17T00:00:00+00:00 List-Id: In article , lutz@iks-jena.de (Lutz Donnerhacke) wrote: > Nope. The former one contains a restriction to 8 bit which can be > considerably slower that using the native character size of the processor. Let's try again. This declaration: declare type Byte is mod 2 ** Character'Size; for Byte'Size use Character'Size; function To_Byte is new Unchecked_Conversion (Character, Byte); B : constant Byte := To_Byte ('A'); begin should have the same efficiency as this declaration declare C : constant Character := 'A'; begin