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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7251fa99aab97e06 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-25 13:40:36 PST Path: sparky!uunet!olivea!sgigate!sgi!wdl1!wdl39!mab From: mab@wdl39.wdl.loral.com (Mark A Biggar) Newsgroups: comp.lang.ada Subject: Re: Assignment Overload in Ada-9X Message-ID: <1993Mar25.214036.6185@wdl.loral.com> Date: 25 Mar 93 21:40:36 GMT References: <1993Mar19.222836.2540@evb.com> <11815@prijat.cs.uofs.edu> Sender: news@wdl.loral.com Organization: Loral Western Development Labs Date: 1993-03-25T21:40:36+00:00 List-Id: In article <11815@prijat.cs.uofs.edu> beidler@guinness.cs.uofs.edu (Jack Beidler) writes: >I recently received a copy of the "Ada 9X Project Report dated >February 1993. On the top of page 48 in this report there is a >statement about overloading assignment, specifically, > ".., in the case of non-limited control types, assignment > can be redefined by the user." >I curious about the form of the overload. Is it soomething like >procedure ":=" (Left : in out Some_Type ; Right : in Some_Type) ? >or have I misread this statement? Not really, the report just doesn't go into enough detail. You don't get to actually override ":=", what you get to override are the underlying routines: INITIALIZE, CLONE and FINALIZE. INITIALIZE is used to prepare the left hand side for assignment, CLONE is used to actually create the copy of the right hand side, and FINALIZE is used to destroy the overwritten left hand side. FINALIZE is also used when a controlled type goes out of scope. A controlled type is any type derived for the system defined tagged type CONTROLLED. See the ILS for more detail. -- Mark Biggar mab@wdl1.wdl.loral.com