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: lutz@iks-jena.de (Lutz Donnerhacke) Subject: Re: An alternative to Unchecked Conversion Date: 1999/12/17 Message-ID: #1/1 X-Deja-AN: 561938150 Distribution: world Content-Transfer-Encoding: 8bit References: <38596575_4@news1.prserv.net> <3859701a@rsl2.rslnet.net> <3859a3ad_2@news1.prserv.net> Content-Type: text/plain; charset=ISO-8859-1 Organization: IKS GmbH Jena Mime-Version: 1.0 User-Agent: slrn/0.9.5.7 (UNIX) Newsgroups: comp.lang.ada Date: 1999-12-17T00:00:00+00:00 List-Id: * Matthew Heaney wrote: >The object declaration > >declare > function To_Unsigned is > new Unchecked_Conversion (Character, Unsigned_8); > > C_As_Byte : constant Unsigned_8 := To_Unsigned ('A'); >begin > >should be identical to the declaration > >declare > C : constant Character := 'A'; >begin > >If the former is more expensive than the latter, then your compiler is >broken. Nope. The former one contains a restriction to 8 bit which can be considerably slower that using the native character size of the processor.