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,3ad432aa4eef81c3 X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Extending Nested Tagged Records Date: 1999/12/06 Message-ID: <6nW24.159$is.27426@typhoon-sf.snfc21.pbi.net>#1/1 X-Deja-AN: 557434608 References: <84E639D0D9829A88.356169F32CD3866A.7936C8200D458BB1@lp.airnews.net> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.snfc21.pbi.net 944517698 206.170.2.230 (Mon, 06 Dec 1999 14:01:38 PST) Organization: SBC Internet Services NNTP-Posting-Date: Mon, 06 Dec 1999 14:01:38 PST Newsgroups: comp.lang.ada Date: 1999-12-06T00:00:00+00:00 List-Id: >type telemetry_type is tagged ... > >type motorized_device is tagged record > telemetry: telemetry_type; -- this is what I want to extend >... >type device_1 is new motorized_device with >... So the telemetry module is not a black box, but may have some things added when it's in a device_1 or different things when it's in a device_2? One approach is to change "telemetry_type" to "basic_telemetry_type", indicating that it's the rock bottom minimum that any motorized_device contains, and then have add-ons like type device_1 is new motorized_device with extra_telemetry : ... Alternatively, drop telemetry entirely from "motorized_device" and instead put appropriate kinds of telemetry in different devices. type telemetry_type_1 is new telemetry_type with ... -- used in device_1 type telemetry_type_2 is new telemetry_type with ... -- used in device_2 type device_1 is new motorized_device with telemetry : telemetry_type_1; ... You could of course include an "access telemetry_type'class" instead of a "telemetry_type" in motorized_device, and then install the appropriate kind in each kind of device. That would also let you have an arbitrary telemetry package in each device type - which perhaps you don't want. What are you trying to accomplish?