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,e6c9800e35ccfeee X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: GNAT: Performance of String functions Date: 1997/07/28 Message-ID: #1/1 X-Deja-AN: 259851769 References: <5r1l6e$e0h$1@ratatosk.uio.no> <1997Jul22.071638.1@eisner> <33D4F30F.5299@online.no> <5r5cfh$irn$1@ratatosk.uio.no> <33D74581.DEC93419@elca-matrix.ch> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-07-28T00:00:00+00:00 List-Id: In article , Mats.Weber@elca-matrix.ch (Mats Weber) wrote: >I think an AI is about to be voted that >>will require predefined "=" to behave correctly for these types, which will >>almost force implementors to use the alternative approach. >>>> >>There is no justification at all for the claim at the end of this >>paragraph. > >So how would you do it ? Make the compiler treat that type in a special >way ? Pad the unused characters with a constant character ? What's wrong with pad characters? On my currect project, which uses Ada 83, we're using the GNAT bounded strings package, modified to pad the unused portion of the string buffer (with ASCII.NUL). Equality works, even though it's a bitwise comparison. Is there any reason why you'd be averse to pad characters as a solution? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271