comp.lang.ada
 help / color / mirror / Atom feed
* unconstrained array question
@ 2003-11-22 17:39 shoko
  2003-11-22 18:11 ` Marius Amado Alves
  0 siblings, 1 reply; 10+ messages in thread
From: shoko @ 2003-11-22 17:39 UTC (permalink / raw)


hi
I have few question to ask:
1.i have a Character array
can i print the all array wich is a string at once or do i have to
pront each item?
2.i have unconstrained array of Character i want to insert a string
when the program runs with the function get for example
how can i do it the compiler telling me i need to define the array
first:

------------------------------------------------------
type Arr is Array(integer range<>) of Character ;
type n_array_Ptr is access Arr;
n:n_array_Ptr ;
s:string(1..100);
begin
n:= new Arr'(Get(s));
-----------------------------------------



^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: unconstrained array question
@ 2003-11-24 18:11 amado.alves
  0 siblings, 0 replies; 10+ messages in thread
From: amado.alves @ 2003-11-24 18:11 UTC (permalink / raw)
  To: comp.lang.ada

First, you cannot call an abstract function.

Correct that, either by making the function concrete (elide "abstract" and provide a body), or by deriving from the controlling type and providing a (concrete) function for the derived type.

Then, to convert between any two compatible types you just write

  Target_Type (Object_Of_Source_Type)



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

end of thread, other threads:[~2003-11-24 18:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-22 17:39 unconstrained array question shoko
2003-11-22 18:11 ` Marius Amado Alves
2003-11-23  7:12   ` shoko
2003-11-23  8:42     ` tmoran
2003-11-23 12:16     ` Marius Amado Alves
2003-11-23 18:03       ` shoko
2003-11-23 20:16         ` Marius Amado Alves
2003-11-24 17:40           ` shoko
2003-11-24 18:16             ` Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2003-11-24 18:11 amado.alves

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