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: a07f3367d7,b85c1b84f840dc22 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: I need a little help - it's been a long time - with enumeration type and for use representation Date: Fri, 13 Nov 2009 14:30:44 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <7495d29e-0361-4eba-9e22-a770ae50f113@d5g2000yqm.googlegroups.com> <1hgihvw2ld2nr.cg5ve3xaww03.dlg@40tude.net> NNTP-Posting-Host: d47424a37c99956cfb53edfdad12ca40 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 356e116545417652e8417def122aef73 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <1hgihvw2ld2nr.cg5ve3xaww03.dlg@40tude.net> X-Validate-Post: http://news.tornevall.net/validate.php?trace=356e116545417652e8417def122aef73 X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news1.google.com comp.lang.ada:8100 Date: 2009-11-13T14:30:44-07:00 List-Id: Dmitry A. Kazakov wrote: > > I do it differently. I have the pattern: > > procedure Get (Text : String; Pointer : in out Integer; Value : out Type) > > which I consistently deploy everywhere. Get takes a textual representation > of Type from Text at Pointer and advances Pointer to the first position > following it. The result is returned though Value. > > However, yes, usually I use a plain type conversion: > > Get (Text, Pointer, Integer (Value)); > > rather than Type'Val (when I am too lazy to instantiate the generic > packages once again with Type) I still don't see where you would use 'Val. -- Jeff Carter "Son of a window-dresser." Monty Python & the Holy Grail 12