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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,495ea95198cfe20f,start X-Google-Attributes: gid103376,public From: woodruff@calaveras.llnl.gov (John Woodruff B481) Subject: Package names & visibility Date: 1996/07/03 Message-ID: #1/1 X-Deja-AN: 163539208 organization: Lawrence Livermore National Lab reply-to: woodruff1@llnl.gov newsgroups: comp.lang.ada Date: 1996-07-03T00:00:00+00:00 List-Id: I find myself puzzled by some consequence of a visibility rule in naming packages, and I wonder if I need to reconsider my plan for making up these names (of if there is a simple re-phrasing that I should know). In very simple form, I have a package specification that declares some type (and other declarations as well of course). Let's say my system will have motors, sensors, switches, etc. So I will operate my motors with a package such as package Motor is type Yes_It_Is is new Integer ; end Motor ; But I need other information in addition to the direct control that I'll implement in the package Motor. Therefore I thought I'd make a family of packages to hold info about motors and sensors etc package Info_About is -- a package that will have children end Info_about ; My intention is to have children packages carry different sorts of info_about; So there will be a package with Motor ; package Info_About.Motor is A : Motor.Yes_It_Is ; -- (I'm not *really* going to declare a visible object!) end ; My thinking was that Info_about.Motor will hold some data values (which are of types defined by the Motor package). But I can't seem to refer to the type Yes_It_Is! My friend Gnat tells me info_about-motor.ads:3:13: "Yes_It_Is" not declared in "Motor" This message clearly states that the visibility of info_about.motor is hiding the package Motor where the type is declared. Please suggest a way that I can refer to the identifiers that are declared in Motor from inside the package Info_about.motor. Thx! -- John Woodruff N I F \ ^ / Lawrence Livermore National Lab =====---- < 0 > 510 422 4661 / v \