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,1fee5782cd952ed7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-12 11:01:09 PST Newsgroups: comp.lang.ada Path: sparky!uunet!telesoft!garym From: garym@telesoft.com (Gary Morris @ignite) Subject: Re: How do I avoid 'use' in this case? Message-ID: <1993Mar12.172657.23697@telesoft.com> Organization: Alsys Group, San Diego, CA, USA References: <1993Mar11.163904.18135@fcom.cc.utah.edu> Date: Fri, 12 Mar 1993 17:26:57 GMT Date: 1993-03-12T17:26:57+00:00 List-Id: In <1993Mar11.163904.18135@fcom.cc.utah.edu> val@fcom.cc.utah.edu (Val Kartchner) writes: >We have a package called 'FIELD_DEF' which (among other things) defines a >variant record type and an access type for referencing it. Here is the >text of the errors generated for one of the lines: > 2693 if (comm_addr_group(i,j) /= NULL) then >..........................................1 >%ADAC-E-NOTDECLOPOPND, (1) /= is not declared for the given operands [LRM 4.5] >I know that with non-operator functions (i.e.: >functions who's names are alphanumeric + '_'), you can use the package name >to avoid 'use'. As far as I know, there is no equivalent for operators. This is not true, you can qualify operators with the package name. We mostly consider it not very readable so we use renames of the operator instead. Either of these will work: if Field_Def."/="(comm_addr_group(i,j), NULL) then Or add this rename in your package to allow your original code above to work, this makes the "=" (and implicitly the "/=") operators visible (replace Record_Type_Name with the actual name of the type): function "="(L,R: Field_Def.Record_Type_Name) return Boolean renames Field_Def."="; if comm_addr_group(i,j) /= NULL then --GaryM -- Gary Morris Internet: garym@telesoft.com TeleUSE Development UUCP: uunet!telesoft!garym Alsys Group (TeleSoft) Phone: +1 619-457-2700 San Diego, CA, USA Fax: +1 619-452-1334