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,c3a7c1845ec5caf9 X-Google-Attributes: gid103376,public From: clines@delete_this.airmail.net (Kevin Cline) Subject: Re: Equality operator overloading in ADA 83 Date: 1997/04/22 Message-ID: <33602040.3178674@news.airmail.net>#1/1 X-Deja-AN: 236487600 References: <01bc4e9b$ac0e7fa0$72041dc2@lightning> Organization: INTERNET AMERICA Newsgroups: comp.lang.ada Date: 1997-04-22T00:00:00+00:00 List-Id: "Manuel Wenger" wrote: > >Hi, >I've started doing some DecADA 83 programming at a technical engineering >school ... and I've run into a problem that I was unable to solve (and my >teacher didn't know any better either :-)) > >I've tried to overload the "=" operator for fractions in a package. It >obviously doesn't work if the type isn't defined as "limited private", and >I don't want that. As an alternative, I found out that I might as well do a >renaming declaration, just by defining the type as "private" - so I've >tried doing that as well, and then using the following to rename the equal >sign: > >In other words, how do I tell my "equal" function to be an equality >operator, authorized to be renamed into "="? HELP! :) > You can't. Period. Why? I don't know. Drove me crazy once. Maybe some Ada-83 committee member will volunteer why it was considered reasonable to redefine '<' and '>' but not '=' .