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 X-Google-Thread: 103376,f47e0c6e2e5fd00d X-Google-Attributes: gid103376,public From: Harald Schmidt Subject: Re: Function name problem Date: 2000/01/16 Message-ID: #1/1 X-Deja-AN: 573303536 Content-Transfer-Encoding: 8bit References: <85qecu$24r$1@nnrp1.deja.com> Content-Type: text/plain; charset="ISO-8859-1" X-Complaints-To: abuse@de.uu.net Organization: Customer of UUNET Deutschland GmbH, Dortmund, Germany Mime-Version: 1.0 User-Agent: Microsoft Outlook Express Macintosh Edition - 5.0 (1513) NNTP-Posting-Date: 16 Jan 2000 11:37:54 GMT Newsgroups: comp.lang.ada Date: 2000-01-16T11:37:54+00:00 List-Id: in article 85qecu$24r$1@nnrp1.deja.com, Jeff Carter at jrcarter001@my-deja.com wrote on 15.01.2000 19:30: > In article , > Harald Schmidt wrote: >> Hi, >> >> I want to declare two function, but the 2nd is not >> allowed by GNAT3.12. Could someone tell me why? >> Here are the two declarations: >> >> package bla is >> type Object is tagged limited private; >> function "=" (Left, Right: in Object�Class) return Boolean; >> function "==" (Left, Right: in Object�Class) return Boolean; >> private >> type Object is tagged limited null record; >> end bla; > > A function declaration with the function designator (name) in quotation > marks (such as "=") defines an operator. The set of operator symbols is > fixed in Ada. While you can define operators for your types, as you did > with "=", you cannot create new operator symbols, as you tried to do > with "==". See ARM 4.5, 6.1, and 6.6. > > -- > Jeff Carter > "Now go away or I shall taunt you a second time." > -- Monty Python and the Holy Grail > > > Sent via Deja.com http://www.deja.com/ > Before you buy. Thank you very much for this info. But can someone explain why this restriction exists? Harald