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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9544fb5ce0a6df8b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.35.68 with SMTP id f4mr21837346pbj.5.1322424045008; Sun, 27 Nov 2011 12:00:45 -0800 (PST) MIME-Version: 1.0 Path: lh20ni25183pbb.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Overloading attributes Date: Sun, 27 Nov 2011 20:00:39 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <8ed87fee-166a-4be9-ae6c-4d0fbeb4788c@s6g2000vbc.googlegroups.com> Reply-To: anon@anon.org NNTP-Posting-Host: tOYCxXbzzW8h0/QVvn0njA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: news2.google.com comp.lang.ada:14686 Date: 2011-11-27T20:00:39+00:00 List-Id: >From time to time this forum has discussed the concept of the "attribute definition clause" (Representation Attributes). Some have even say it would cause an increase of 4_000 lines of code to be written to include this feature in a compiler. >From Ada 95 RM 13.3 Representation Attributes 2 attribute_definition_clause ::= for local_name'attribute_designator use expression; | for local_name'attribute_designator use name; Legality Rules 5 (95) 5/1 (2005) An attribute_designator is allowed in an attribute_definition_clause only if this International Standard explicitly allows it, or for an implementation-defined attribute if the implementation allows it. Each specifiable attribute constitutes an aspect of representation. This clause does not forbid the creation of new attribute it only states that it is up to the implementation to allow it if the Standard does not explicitly allows it. For instant, the implementation could say that the programmer can create new attributes for types created by the programmer only. Aka like the attribute "Image" (which is define for scalar objects), for a programmer defined record. Or the implementation could predefine a set of "attribute designators" that could be used by a programmer. And for Ada 83, the complete syntax and implementation of must be documented in Appendix F for the allowed representation clauses. So, Ada 83 allows the creation with just documentation. As for Standards Ada 95, Ada 2005 and Ada 2012 they started to limit the usage, but still allow with the implementation permission. Which means that Ada can allow a programmer to create "Representation Attributes" aka "Attributes" with some limitations if the Standard or the Implementation allows it. In , "J-P. Rosen" writes: >Le 27/11/2011 04:36, anon@att.net a �crit : >> In Ada, Overloading is allow for all attributes include programmers >> created attributes. >please point me at the RM paragraphe that allows programmers created >attributes, I must have missed something! > >-- >--------------------------------------------------------- > J-P. Rosen (rosen@adalog.fr) >Adalog a d�m�nag� / Adalog has moved: >2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX >Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00