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,75ffc1f081ec10e3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!proxad.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Constant record components From: Georg Bauhaus In-Reply-To: <12arsrtbe8flpf8@corp.supernews.com> References: <12ad8guf3sg1o0d@corp.supernews.com> <1loq7utmaxvll$.yqsxj5edzqgv.dlg@40tude.net> <12afs64kh432q0e@corp.supernews.com> <12aihj2lrjqpc3a@corp.supernews.com> <7bednaJHX_FTMDTZnZ2dnUVZ_uudnZ2d@megapath.net> <12ak5urrrj6d756@corp.supernews.com> <12arsrtbe8flpf8@corp.supernews.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1152263715.5568.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Fri, 07 Jul 2006 11:15:16 +0200 NNTP-Posting-Date: 07 Jul 2006 11:13:01 MEST NNTP-Posting-Host: 8a628a76.newsread2.arcor-online.net X-Trace: DXC=6RNcV6@8:=P9Ihe`BH@Z?dZ]MOidE X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5549 Date: 2006-07-07T11:13:01+02:00 List-Id: On Thu, 2006-07-06 at 22:39 -0700, ME wrote: > What I am looking for is a way to read in a values from a file ,assign them > once to records and disallow any future assignment i.e. these "constant > parts of the records represent a structure that I don't want to ever change > during the life of the program (write once and read only afterwards). Wouldn't it be an option to declare the public view of the to-be-constant record subtype limited? > It > would be similar to a constant declaration but inside of a record. I don't > think that it is disgusting at all. > "Randy Brukardt" wrote in message > news:ObSdnQYngMQKEzDZnZ2dnUVZ_oadnZ2d@megapath.net... > > "Jean-Pierre Rosen" wrote in message > > news:p6fi8e.de4.ln@hunter.axlog.fr... > >> Randy Brukardt a crit : > >> > > >> > I can say that the notion that something declared "constant" could in > > fact > >> > be assigned to in some scope is rather disgusting. I don't think it > > would > >> > fly. > >> > > >> Hmmm.... Initialization of controlled constants? > > > > After initialization, of course. (Constants are assign-once, logically. > > Assign-never would be a problem, because they'd have no value at all in > > that > > case!) And similarly, before finalization (although it shouldn't really be > > necessary to clear the finalized result -- but it is often done, and > > harmless to do). > > > > Still, allowing the assignment of a name that is declared to be a constant > > view at some point between initialization and finalization would be a > > nasty > > change to the language. (Note that it might be possible to assign via a > > different name; that's a different issue -- and one that is usually a > > programming error.) Otherwise, "constant" would essentially be > > meaningless -- bringing us back to the beginning; if it doesn't mean > > anything, why bother with it at all? > > > > Randy. > > > > > >