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,7ba49aac4e73460 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.154.143 with SMTP id o15mr554887bkw.4.1328880543895; Fri, 10 Feb 2012 05:29:03 -0800 (PST) Path: t13ni11235bkb.0!nntp.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Need Help On Ada95 Problem Date: Fri, 10 Feb 2012 08:29:03 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <553ceec3-ec34-41de-9723-0dc342379cfe@vv9g2000pbc.googlegroups.com> <4ea6309f-cf07-44f6-8c56-5189a0081dcc@g27g2000yqa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1328880543 14452 192.74.137.71 (10 Feb 2012 13:29:03 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 10 Feb 2012 13:29:03 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:bKkWHW82QvO3fazZwn+6PmvK37k= Content-Type: text/plain; charset=us-ascii Date: 2012-02-10T08:29:03-05:00 List-Id: "Alex" writes: > Oh, I see how you're confused. Once you get the value of each digit in > the PIN, though, it doesn't matter that the 3-4-5 corresponding to > V-A-L isn't in ASCII order. . . it's still just a direct index-based > lookup (just off-by-one because Ada Strings are indexed starting at 1 > rather than 0). There's no off-by-one issue here. The OP wants a mapping from digit characters to other characters. That can be implemented as a simple array, with the right index subtype. That array isn't a String, because they keys are not integers. - Bob