From: Harald Schmidt <Harald.Schmidt@tomcat.de>
Subject: Re: Function name problem
Date: 2000/01/16
Date: 2000-01-16T11:37:54+00:00 [thread overview]
Message-ID: <B4A76C00.4583%Harald.Schmidt@tomcat.de> (raw)
In-Reply-To: 85qecu$24r$1@nnrp1.deja.com
in article 85qecu$24r$1@nnrp1.deja.com, Jeff Carter at
jrcarter001@my-deja.com wrote on 15.01.2000 19:30:
> In article <B4A633AE.3FF3%Harald.Schmidt@tomcat.de>,
> Harald Schmidt <Harald.Schmidt@tomcat.de> 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
next prev parent reply other threads:[~2000-01-16 0:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-15 0:00 Function name problem Harald Schmidt
2000-01-15 0:00 ` Jeff Carter
2000-01-16 0:00 ` Harald Schmidt [this message]
2000-01-16 0:00 ` David Starner
2000-01-16 0:00 ` David C. Hoos, Sr.
2000-01-16 0:00 ` David Starner
2000-01-18 0:00 ` Howard W. LUDWIG
2000-01-16 0:00 ` David A. Cobb
2000-01-16 0:00 ` David Starner
2000-01-17 0:00 ` David A. Cobb
2000-01-17 0:00 ` David Starner
2000-01-17 0:00 ` Jeff Carter
2000-01-16 0:00 ` Matthew Heaney
2000-01-16 0:00 ` Harald Schmidt
2000-01-16 0:00 ` Gautier
2000-01-17 0:00 ` Matthew Heaney
2000-01-26 0:00 ` Florian Weimer
2000-01-15 0:00 ` Pascal Obry
2000-01-15 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox