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,d7c81785cd4fb3cb X-Google-Attributes: gid103376,public From: "Matthew Heaney" Subject: Re: I want 'Class'Input back! Date: 1999/10/12 Message-ID: <3803cc6c_1@news1.prserv.net>#1/1 X-Deja-AN: 536027041 Content-transfer-encoding: 7bit References: <7u0as6$fmm$1@nnrp1.deja.com> Content-Type: text/plain; charset="US-ASCII" X-Complaints-To: abuse@prserv.net X-Trace: 13 Oct 1999 00:03:56 GMT, 129.37.62.159 Organization: Global Network Services - Remote Access Mail & News Services Mime-version: 1.0 Newsgroups: comp.lang.ada Date: 1999-10-12T00:00:00+00:00 List-Id: In article <7u0as6$fmm$1@nnrp1.deja.com> , Ted Dennison wrote: > I'm experimenting with making a private type limited. Good choice. > Unfortunately doing this toasts the default definitions for the stream > attributes for that type. But I *liked* the default definitions for the stream > attributes. In fact, I need 'Input, 'Output, 'Class'Input, and 'Class'Output. I think you only need to replace the stream attribute operations of the *specific* type T. The stream attributes T'Class'Input and T'Class'Output describe the attributes of the *class-wide* type, which the compiler supplies for you. The compiler implements T'Class' by calling the ops you supply for the specific type. (I think.) > So just write my own clones of those attributes, then do a "for > typename'{Attribute} use", right? Well, the problem is I can't figure > out is how to (re)make 'Class'Input myself. Its definition from the LRM > is: You don't have to. Just supply ops for T'Input and T'Output. > First reads the external tag from Stream and determines the > corresponding internal tag (by calling > Tags.Internal_Tag(String'Input(Stream)) -- see 3.9) and then dispatches > to the subprogram denoted by the Input attribute of the specific type > identified by the internal tag; returns that result. This is explaining how the compiler implements T'Class'Input -- by calling your T'Input op. > So how do I write Ada code to do this? I hope I'm missing something > simple. I think it is simple -- you don't have to do anything to get T'Class', because the compiler does it for you. Matt -- If we let the Creationists have their way, we may as well go whole hog. Let us reintroduce the flat-earth theory, the chemistry of the four elements, and mediaeval astrology. For these outworn doctrines have just as much claim to rival current scientific views as Creationism does to challenge evolutionary biology. Abusing Science: The Case Against Creationism Philip Kitcher