comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org
Subject: Re: Gnat GPL 2010 available soon
Date: Sun, 27 Jun 2010 03:33:34 +0000 (UTC)
Date: 2010-06-27T03:33:34+00:00	[thread overview]
Message-ID: <i06gqc$ff1$1@speranza.aioe.org> (raw)
In-Reply-To: bb9c5de5-f9ee-4388-9bc0-667cf4372287@u26g2000yqu.googlegroups.com

In <bb9c5de5-f9ee-4388-9bc0-667cf4372287@u26g2000yqu.googlegroups.com>, "lekktu@gmail.com" <lekktu@gmail.com> writes:
>On Jun 26, 11:04=A0pm, a...@anon.org wrote:
>
>> Now, to compile the Ada system this statement type must work because it
>> is embeded in a number of locations in the Ada.Text_IO.adb and other
>> Ada system packages.
>
>Yes. Conditional expressions do not fail everywhere. In this specific
>case, both Dir & '\' and the fact that Dir is a function argument are
>required to trigger the bug.
>
>> So, first, try compiling without the "-gnat12" switch.
>[...]
>> Last, if you have or still have GNAT 2009 try compiling using 2009:
>
>I've already reported the bug, so I'll let them (AdaCore) do the
>debugging...


The compiler blowing up is an error, but, there are always a way around 
that type of error, if you find the correct syntax.  Try adding parenthesis 
around the output, since the compiler may see the "Dir" as value and 
the " & '\'" as extra not part of the statement.


function Validate (Dir : in String) return String is
begin
   return (if Dir (Dir'Last) = '\' then Dir else (Dir & '\'));
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.  Unless 
you want to spend time in reading the though the gnat Ada compiler.

now, in taking a quick look at "par_ch4.adb", Adacore did add that 
"gnat12" only switch to use the following features:

    1. conditional expression  -- statement must be parenthesized.

              (if X then Opt1 else Opt2)

              where Opt1 and Opt2 must be a function or variable


-- the following two addition are not in the documentation, yet!

    2. case expression -- statement must be parenthesized.
           assuming syntax is like conditional expression

              (case X when Opt1 => Val1 
                      when Opt2 => Val2 when others => Val2)

              where Val1 and Val2 must be a function or variable

    3. from RM 4.5.2 Relational Operators and Membership Tests


          Now allows the use of "Vertical_Bar" in Membership Tests

          assuming from code syntax 

              N  in  X .. Y | A .. B | G .. K





  reply	other threads:[~2010-06-27  3:33 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 20:14 Gnat GPL 2010 available soon Stephen Sangwine
2010-06-16 21:24 ` Martin
2010-06-16 21:35 ` Simon Wright
2010-06-18 19:48 ` Albrecht Käfer
2010-06-26 12:04   ` lekktu
2010-06-26 21:04     ` anon
2010-06-26 21:41       ` lekktu
2010-06-27  3:33         ` anon [this message]
2010-06-27 10:49           ` lekktu
2010-06-26 21:42     ` Dmitry A. Kazakov
2010-06-26 22:01       ` lekktu
2010-06-27  8:04       ` Gnat GPL 2010 available soon (conditional expressions) Georg Bauhaus
2010-06-27  8:37         ` Dmitry A. Kazakov
2010-06-27 10:55           ` lekktu
2010-06-27 12:12             ` Dmitry A. Kazakov
2010-06-27 13:42               ` Georg Bauhaus
2010-06-27 14:35                 ` Peter C. Chapin
2010-06-27 16:53                   ` Dmitry A. Kazakov
2010-06-28 11:24                     ` Peter C. Chapin
     [not found]                       ` <oizwym2afwmx.1jm5tt7wtpm7v.dlg@40tude.net>
2010-06-28 14:47                         ` Georg Bauhaus
2010-06-28 16:36                           ` Dmitry A. Kazakov
2010-06-28 17:04                             ` Georg Bauhaus
2010-06-28 17:37                               ` Dmitry A. Kazakov
2010-06-29 19:28                   ` Randy Brukardt
2010-06-30  1:19                     ` BrianG
2010-06-30  3:21                       ` Britt Snodgrass
2010-07-05  1:27                         ` Phil Clayton
2010-07-05 10:26                           ` Georg Bauhaus
2010-07-05 14:24                             ` Phil Clayton
2010-07-05 13:12                           ` Dmitry A. Kazakov
2010-07-05 22:47                             ` Phil Clayton
2010-07-06  7:36                               ` Dmitry A. Kazakov
2010-07-06  9:13                                 ` Georg Bauhaus
2010-07-06 16:31                                 ` Phil Clayton
2010-07-06 17:18                                   ` Dmitry A. Kazakov
2010-07-07 12:00                                     ` Phil Clayton
2010-07-07 13:39                                       ` Dmitry A. Kazakov
2010-06-30  4:13                       ` Gautier write-only
2010-06-30 16:46                         ` Warren
2010-06-30  4:09                     ` Gautier write-only
2010-06-30 23:20                       ` Peter C. Chapin
2010-06-27 21:40 ` Gnat GPL 2010 available soon mahdert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox