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,7eb7a3b7910238a7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-04-05 16:19:10 PST Path: gmd.de!Germany.EU.net!mcsun!uunet!olivea!sgigate!sgi!wdl1!wdl39!mab From: mab@wdl39.wdl.loral.com (Mark A Biggar) Newsgroups: comp.lang.ada Subject: Re: Classes vs Tagged Types - Terminology Message-ID: <1993Apr5.230419.20525@wdl.loral.com> Date: 5 Apr 93 23:04:19 GMT References: <1993Apr5.155419.8598@evb.com> Sender: news@wdl.loral.com Organization: Loral Western Development Labs Date: 1993-04-05T23:04:19+00:00 List-Id: In article <1993Apr5.155419.8598@evb.com> jgg@evb.com (John Goodsen) writes: >In <1993Mar25.155650.16244@inmet.camb.inmet.com> >stt@spock.camb.inmet.com (Tucker Taft) writes: > >> >>In Ada 9X, it is only class-wide types (named "T'Class") that provide >>subclass matching. >> ^^^^^^^^^^^^^^^^^ > Didn't you mean "tagged types" :-) No he meant Class-wide. The class-wide type T'class is a type whose value set includes the union of the value sets of tagged type T and all tagged types derived from T (even including those that havn't been defined yet). If I have a procedure with the header: procedure FOO(X: T); the only a member of tagged type T can the used as an actual without using a type conversion. If the header was: procedure FOO(X: T'CLASS); then any member of tagged type T or any tagged type derived from T can be used as an actual and inside FOO the parameter X retains its tag, unlike the first case, where if you passed a parameter of a type derived from T (using a type conversion) X stiil has the tag of tagged type T. One other case should be mentioned, If I call the first FOO above with an actual of type T'CLASS, then the system does dynamic dispatch to the body corresponding to the actual tag of the value contained in class-wide actual. -- Mark Biggar mab@wdl1.wdl.loral.com