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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,aab48c153d1e916b,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: "zork" Newsgroups: comp.lang.ada Subject: questions from a newbie Date: Thu, 15 Jul 2004 23:20:35 +1000 Organization: - X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 220.245.100.34 X-Original-NNTP-Posting-Host: 220.245.100.34 Message-ID: <40f684a8@dnews.tpgi.com.au> X-Trace: dnews.tpgi.com.au!tpg.com.au 1089897640 220.245.100.34 (15 Jul 2004 23:20:40 +1000) Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Xref: g2news1.google.com comp.lang.ada:2181 Date: 2004-07-15T23:20:35+10:00 List-Id: Hi, I just started a course in ada. I just have 2 questions at present. ------------- q1) can: c : character; if c in 'A'..'Z' or c in 'a'..'z' or c in '0'..'9' then .... end if; be written as something like: c : character; if c in ('A'..'Z', 'a'..'z', '0'..'9') then .... end if; ------------- Also, I know you can do the following: type new_type is array(1..20) of string(1..50); words : new_type; index : integer := 20; words (15) (index ..index) := "K"; however I find that I cannot instead say: words(15)(index):="K"; why is this so? I get a "Type mismatch in assignment statement, continuing" error. It does however work when I use words(15)(index):='K'. The rational behind this is that (index..index) represents a range - hence a string - whereas (index) represents a single character? Any insight most helpful. Cheers, zork