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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c469fdacc2f3302b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Dynamic Variant Record Creation Date: Tue, 16 Mar 2010 20:24:32 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Tue, 16 Mar 2010 20:24:32 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="5422"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ErL5Qql6/1QC/rQW8pQX9g/V9/b/cCcE=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:zL9EDVEXmDEnnKRw8qc4BbxyV1I= Xref: g2news1.google.com comp.lang.ada:9606 Date: 2010-03-16T20:24:32+00:00 List-Id: Jeffrey R. Carter expounded in news:hnoosj$a1e$1@tornado.tornevall.net: > Warren wrote: >>>> procedure Emit_Token(T : Token_Type) is >>>> T : Token_Type := Token_Type'Val(Character'Pos( >>> Ch)); >>>> begin >>>> Token := ( Token => T ); >>>> end; > > I missed a bunch of this thread. But you can do what you want: > > declare > Result : Token_Unit (Token => T); > begin > Token := Result; > end; > > Quite possibly this is also "Georg's solution". I haven't had a chance to see if this "works", but the compiler seems a little happier now- but warns: *.adb:327:13: warning: variable "Result" is read but never assigned Perhaps a dummy assignment after I am through with it would be enough. Is there a better way of dealing with the warning? I'll give this a go later tonight, when I have more time. Warren