From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Re: Anonymous array clarification.(Better idea, I think.)
Date: Mon, 20 Aug 2001 16:58:29 -0500
Date: 2001-08-20T16:58:29-05:00 [thread overview]
Message-ID: <mailman.998344708.27022.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: Qsfg7.47279$K6.18175611@news2
----- Original Message -----
From: "McDoobie" <chris@dont.spam.me>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Monday, August 20, 2001 4:40 PM
Subject: Re: Anonymous array clarification.(Better idea, I think.)
> Okay, from the above posts in this thread, I think I might be getting
> somewhere.
>
> I'm thinking my problem stems from understanding the difference between an
> "Object" and a type. As I'm coming from a C background, Objects and
> Classes are real fuzzy for me.
>
> So if I say...
>
> type foo_array is array(1..N) of character;
>
> this would be an Object declaration. Then I would instantiate it
> thusly....
>
> bar_array : foo_array;
>
> correct?
>
No. Bar_array is an object declaration. foo_array is a type declaration.
> However if I say...
>
> some_chars : array(1..N) of character;
>
> this would be just a simple array declaration, with none of the Object
> Oriented properties carried along with it.
>
some_chars is also an object declaration, but of an anonymous array type.
> And with the Object "foo_array" declared above, I could say ...
>
> type Upper_Case is subtype foo_array;
>
> and it should work?
There is nothing yet to"work," since there are no executable statements,
only declarations. In fact, you have declared no object of type Upper_Case,
so it does noting for you but to declare a type of which you have declared
no object.
None of whjat you've done so far has anything to do with the object-oriented
features of Ada.
It seems like you really need to get hold of a good Ada book.
>
> Am I beginning to get the picture?
>
> McDoobie
> chris@dont.spam.me
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
next prev parent reply other threads:[~2001-08-20 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-20 21:40 Anonymous array clarification.(Better idea, I think.) McDoobie
2001-08-20 21:58 ` David C. Hoos [this message]
2001-08-20 23:33 ` Jeffrey Carter
2001-08-21 0:49 ` Darren New
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox