Date:
Thu, 16 Jul 1998 10:40:48 -0400
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset="us-ascii"
|
Thanks Tucker for the clarification. I too almost got into the mode of
thinking that if GNAT accepts it, it must be right. I should know better
... sigh.
Apex also rejects (properly) the original code, since only if Left and
Right were Boolean would Standard.And apply.
Another approach that works is to use a child package to define the new
functions and refer back to the parent package definition of "and".
package Some_Package is
type Private_Type is private;
private
type Private_Type is array (0 .. 1023) of Boolean;
end Some_Package;
package Some_Package.Sub_Function is
function "and" (Left, Right : Private_Type) return Private_Type;
end Some_Package.Sub_Function;
package body Some_Package.Sub_Function is
function "and" (Left, Right : Private_Type) return Private_Type is
begin
return Some_Package."and" (Left, Right);
end "and";
end Some_Package.Sub_Function;
Regards,
Steve
|
|
|