🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #968

hiding predefined "="

#968
From: Doug Bryan
Date: Wed, 24 Sep 1986 07:33
21 lines
1061 bytes
To:     "Pat Rogers, High Tech Lab" <ROGERS%uhcl.csnet@CSNET-RELAY.ARPA>

Pat, you were so close.  You had the right idea when you derived from
Integer.  Does the following do what you want?

    package P is
      type LP is limited private;
      function "="( Left, Right : LP ) return Boolean;
    private
      type D  is access Integer;
      type LP is new D;
    end P;

    function "="( Left, Right : LP ) return Boolean is
    begin
      return D (Left) = D (Right);  
    end "=";

doug
-------
Technical Details
Message-ID: <12241420851.9.BRYAN@Sierra.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!SIERRA.STANFORD.EDU!Bryan

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!SIERRA.STANFORD.EDU!Bryan
From: Bryan@SIERRA.STANFORD.EDU (Doug Bryan)
Newsgroups: net.lang.ada
Subject: hiding predefined "="
Message-ID: <12241420851.9.BRYAN@Sierra.Stanford.EDU>
Date: Wed, 24-Sep-86 03:33:06 EDT
Article-I.D.: Sierra.12241420851.9.BRYAN
Posted: Wed Sep 24 03:33:06 1986
Date-Received: Fri, 26-Sep-86 20:56:51 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 21