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,af59fce29fedcd28 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: overloading "=" (equal sign) Date: 1999/06/08 Message-ID: #1/1 X-Deja-AN: 486946951 References: <7jhq7l$66c$1@bgtnsc03.worldnet.att.net> NNTP-Posting-Date: Mon, 07 Jun 1999 22:19:16 PDT Newsgroups: comp.lang.ada Date: 1999-06-08T00:00:00+00:00 List-Id: On Mon, 7 Jun 1999 21:13:21 -0400, "John" wrote: > It looks like the "=" sign when overloaded, it asks for limited type > parameters only. I'm not sure what you mean by this, becuase the equality operator does NOT have to take limited types as parameters. Perhaps if you send some code, then we can determine what the problem is. > So, I declare: > type 'variable' is limited private; I don't know what you mean by this, since this is not a legal Ada declaration. > then, > private > type 'variable' is new u32.un_integer; > > Is there any way to pass non-limited parameters to my function ? If you mean, Can an equality operator take non-limited types as parameters, the answer is yes. > Or, is there any way to get rid of the private stuff ? Yes: package P is type My_Integer is new Interfaces.Unsigned_32; -- type My_Integer is mod 2**32; -- (alternate declaration) function "=" (L, R : My_Integer) return Boolean; end P; package body P is function "=" (L, R : My_Integer) return Boolean is begin end; end P; But I really don't know if this is what you want to do.