comp.lang.ada
 help / color / mirror / Atom feed
* RE: arrays..
@ 2002-05-13  0:30 Beard, Frank [Contractor]
  2002-05-13 10:45 ` arrays chris.danx
  0 siblings, 1 reply; 7+ messages in thread
From: Beard, Frank [Contractor] @ 2002-05-13  0:30 UTC (permalink / raw)


Arrays of characters are called strings:

   word : string (1..50);   -- anonymous declaration

or

   type Word_Type is string (1..50);
   word : Word_Type;

Of course, nothing stops you from declaring:

   type Word_Type is array (1..50) of character;
   word : Word_Type;

But, there are advantages to using strings, including
predefined packages for doing various things.

As far as arrays of words, you will have to grow
your own.  You could use something like:

   type Word_Array is array (1..100) of Word_Type;

or, a little more dynamic:

   type Word_Array is array (1..100) of
           Ada.Strings.Unbounded.Unbounded_String;

Plus, a hundred other variations.

Frank

-----Original Message-----
From: devine
To: comp.lang.ada@ada.eu.org
Sent: 5/12/02 7:34 PM
Subject: arrays..

Hi.  I have seen many examples of array of integers and floats, are
their
any examples of  array of characters and array of words?


_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Arrays
@ 2003-05-29 10:08 Drey
  2003-05-29 12:00 ` Arrays John R. Strohm
  2003-05-29 12:22 ` Arrays David C. Hoos, Sr.
  0 siblings, 2 replies; 7+ messages in thread
From: Drey @ 2003-05-29 10:08 UTC (permalink / raw)


hi !

problem: i need the last place of a 2 dimensional array

well how can i do it ?

A : array (1..2,3..4);
...
A'last = 2 ?
and how do i get 2nd dimension ?

Thanks :)



^ permalink raw reply	[flat|nested] 7+ messages in thread
* arrays..
@ 2002-05-12 23:34 devine
  0 siblings, 0 replies; 7+ messages in thread
From: devine @ 2002-05-12 23:34 UTC (permalink / raw)


Hi.  I have seen many examples of array of integers and floats, are their
any examples of  array of characters and array of words?





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-05-29 20:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13  0:30 arrays Beard, Frank [Contractor]
2002-05-13 10:45 ` arrays chris.danx
  -- strict thread matches above, loose matches on Subject: below --
2003-05-29 10:08 Arrays Drey
2003-05-29 12:00 ` Arrays John R. Strohm
2003-05-29 12:22 ` Arrays David C. Hoos, Sr.
2003-05-29 20:36   ` Arrays Drey
2002-05-12 23:34 arrays devine

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