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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,334f9012742e58fc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k39g2000yqb.googlegroups.com!not-for-mail From: "lekktu@gmail.com" Newsgroups: comp.lang.ada Subject: Re: Gnat GPL 2010 available soon Date: Sun, 27 Jun 2010 03:49:30 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8a0742d6-2094-4a12-be57-d511e5eea3a7@k39g2000yqb.googlegroups.com> References: <2010061621145016807-sjs@essexacuk> NNTP-Posting-Host: 88.7.204.53 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1277635770 24172 127.0.0.1 (27 Jun 2010 10:49:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 27 Jun 2010 10:49:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k39g2000yqb.googlegroups.com; posting-host=88.7.204.53; posting-account=R62THAoAAACcBd11BFBbpfyAY2QqVHpy User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:11947 Date: 2010-06-27T03:49:30-07:00 List-Id: On Jun 27, 5:33=A0am, a...@anon.org wrote: > The compiler blowing up is an error, but, there are always a way around > that type of error, if you find the correct syntax. =A0Try adding parenth= esis > around the output, since the compiler may see the "Dir" as value and > the " & '\'" as extra not part of the statement. I already know a couple ways around the bug, starting from going back to if Dir (Dir'Last) =3D '\' then return Dir; else return Dir & '\'; end if; all the way to function Validate (Dir : in String) return String is Validated : constant String :=3D (if Dir (Dir'Last) =3D '\' then Dir else Dir & '\'); begin return Validated; end Validate; > And until the Ada2012 RM or documentation/examples come out from Adacore, > its anyone guess on the true syntax of all additional statements. This has nothing to do with syntax, which is correct AFAICS (please note the above example with the Validated constant string compiles just fine). It's a plain simple bug. > Unless you want to spend time in reading the though the gnat Ada compiler= . I often do.