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.68.74.201 with SMTP id w9mr3856460pbv.0.1328884211477; Fri, 10 Feb 2012 06:30:11 -0800 (PST) Path: wr5ni8891pbc.0!nntp.google.com!news2.google.com!news1.google.com!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!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 09:30:10 -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 1328884210 16333 192.74.137.71 (10 Feb 2012 14:30:10 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 10 Feb 2012 14:30:10 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:VPBYtyKHqLGQopjK/fYbtRxtgus= Content-Type: text/plain; charset=us-ascii Date: 2012-02-10T09:30:10-05:00 List-Id: "Alex" writes: > This is a homework assignment and I think the translation lookup table > is provided as a string, not an array. As I understood the problem statement, the input and output are of type String. Writing the translation table is the homework assignment, and String makes no sense for that. But I might have misunderstood. >... As far as I know, there is no > way in Ada to make string indexing start at 0. Well, "X: String(0 .. -1000);" creates a String starting at zero, but that's beside the point here. > You're right, an array of chars indexed starting at 0 would be better, That's not what I had in mind, but I'll leave it at that. Maybe the OP would like to post his solution when it's all done. > but at this point of the course, I don't think they've covered arrays. > I think they use strings to introduce the concepts and then go into > arrays later. - Bob