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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9b7d3a51d0d8b6ee X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!novso.com!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 25 Nov 2008 12:24:59 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Extending discriminant types References: <20081115101632.5f98c596@cube.tz.axivion.com> <20081122011825.5354d1c1@cube.tz.axivion.com> <4928ecad$0$32681$9b4e6d93@newsspool2.arcor-online.net> <648Wk.39330$_Y1.32087@bgtnsc05-news.ops.worldnet.att.net> <492a7d07$0$30236$9b4e6d93@newsspool1.arcor-online.net> <8e021577-260a-44e1-b765-4d81f6ba89df@33g2000yqm.googlegroups.com> In-Reply-To: <8e021577-260a-44e1-b765-4d81f6ba89df@33g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <492be08b$0$32676$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Nov 2008 12:24:59 CET NNTP-Posting-Host: 53760add.newsspool2.arcor-online.net X-Trace: DXC=LRg:3QXT Martin schrieb: > You can't ever use 'Base on its own in Ada83. The collection of multifocal arguments given for or against 'Base, and/or GNAT, is, I guess, multitargetting some other, ideas (that, frankly, I find slightly elusive): "the Base was a concept only not a usable attribute, which is also stated in book "Ada Problem Solving and Program Design", 1990" -- anon However, 'Base can designate something very regular in "Ada 83 mode", it is not "just a concept", at least in sofar as this would imply "not in the language". (I don't have a copy of Mike Feldman's book, which anon has been referencing in its enterity, so I can't check, but I' guess that the author has not spun that many arguments on loosly related issues around 'Base.) As you point out, 'Base *is* an attribute (and nothing else) in Ada 83, with a restriction on where and how to use it. 'Base can be applied to record type names in suitable context. Other constructs of current and past editions of Ada have similar restrictions, haven't they? So here are two uses of 'Base. The unit compiles fine, it seems. generic type N is (<>); package U is type T (Len: Integer) is private ; type Count is new N range 0 .. N'Base'Last; -- 'BASE function "=" ( Left, Right : Count) return Boolean ; private type T (Len: Integer) is record null; end record; X: T (Len => T'Base'Size) ; -- 'BASE, TOO end U ; A sequence of attributes is still part of Ada, so their sequencing is not just Ada 83.