comp.lang.ada
 help / color / mirror / Atom feed
From: wanker@exploited.barmy.army
Subject: Re: GNAT Limitations?
Date: 1998/01/25
Date: 1998-01-25T00:00:00+00:00	[thread overview]
Message-ID: <6aft7v$vos$1@Masala.CC.UH.EDU> (raw)
In-Reply-To: 01bd296e$fad757c0$0e2915c0@p5120


In article <01bd296e$fad757c0$0e2915c0@p5120>,
bklungle <bklungle@ix.netcom.com> wrote:
>1. Read the manual

Did that.

>2. Remove Ada.

The manual told me to use Ada.  So should I do (1) then ignore
what it says?  After all I can't heed 1 & 2 at the same time.

If the LRM says one thing and GNAT is supposed to be a conforming
Ada compiler, then it is a natural assumption to think that it
would follow the Manual (or have the rules for reading manuals
changed?).


>3. Put the (n) where it belongs
>

In that case, the C/C++ to Ada document is in error.  I will see
about contacting the author/maintainer.


>enclosed
>
>with Unchecked_Deallocation;

Completely different from every manual I've seen, so reading the
manual is of zero help here.


>
>procedure Huh is
>
>  type x is
>    record
>      a : integer := 0;
>      b : integer := 0;
>      c : integer := 0;
>    end record;
>  type x_ptr is access x;
>
>  procedure dispose is new Unchecked_Deallocation(x, x_ptr);

Ok, so far so good.  I'll try this out.


>
>  an_x : x := (a => 1, b => 2, c => 3);

This was already working, the problem was that leaving out the
b caused it to not compile, and according to the manuals that
you insisted I read, it should not do that.  


>
>  type m is array(1..2, 1..3) of integer;
>  an_m : m := (others => (others => 0));
>
>begin
>  for i in an_m'range(1) loop
>    for j in an_m'range(2) loop
>      an_m(i,j) := i;
>    end loop;
>  end loop;
>end Huh;
>

Ok, I see what you mean.


>
>-- and then compile
>
>linux:~/atest> touch *.adb
>linux:~/atest> ada huh.adb
>gcc -c -g huh.adb
>gnatbind -x huh.ali
>gnatlink -g huh.ali
>linux:~/atest> 

Thank heaven for IDEs.

Thank you for all your help, although I am still annoyed at
the discrepencies between the Manuals & GNAT's behavior.  But
then it is a free tool, and even with the discrepencies it is
probably one of the better quality compilers out there.








  reply	other threads:[~1998-01-25  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-25  0:00 GNAT Limitations? wanker
1998-01-25  0:00 ` bklungle
1998-01-25  0:00   ` wanker [this message]
1998-01-26  0:00     ` Stephen Leake
1998-01-26  0:00       ` Nick Roberts
     [not found]     ` <EnECID.GyI@world.std.com>
     [not found]       ` <EnIJ7B.8CB@world.std.com>
1998-01-29  0:00         ` bklungle
1998-01-29  0:00         ` Nick Roberts
1998-01-25  0:00 ` Keith Thompson
1998-01-25  0:00   ` wanker
1998-01-26  0:00     ` Nick Roberts
1998-02-18  0:00 ` Ed Colbert
     [not found] <6aesm3$sr6$1@masala.cc.uh.edu>
1998-01-25  0:00 ` wanker
replies disabled

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