From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_40 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:446a:: with SMTP id s10mr3947181qvt.2.1596743104662; Thu, 06 Aug 2020 12:45:04 -0700 (PDT) X-Received: by 2002:ac8:964:: with SMTP id z33mr10834526qth.276.1596743104503; Thu, 06 Aug 2020 12:45:04 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Aug 2020 12:45:04 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=165.73.112.105; posting-account=FlDDTgoAAAB5iCuW7fM5pP_RHQGC8krX NNTP-Posting-Host: 165.73.112.105 References: <8b2858e0-e69c-4a22-ad51-a6a7c51e7a7do@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7348444d-f3a1-4bd2-823c-7c67052c0a5co@googlegroups.com> Subject: Re: Newbie question # 2 From: Ian Douglas Injection-Date: Thu, 06 Aug 2020 19:45:04 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1764 X-Received-Body-CRC: 2354877794 Xref: reader01.eternal-september.org comp.lang.ada:59678 List-Id: On Thursday, 6 August 2020 21:20:15 UTC+2, Niklas Holsti wrote: > > Ada does not have such a feature. I figured as much, probably "unsafe programming practice" at the end of the day. > In Ada, you, yourself, have to program the mapping from the name > (string) to the variable. This can be as simple as an if-then-else cascade: Yes, I was trying to avoid cascading Ifs or case statement :-) In this case there are only 5 things so a case statement would be the quickest/easiest, but it would be good to have a better technique for when there are more. Thanks, Ian