comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: unconstrained array question
Date: Mon, 24 Nov 2003 18:16:39 GMT
Date: 2003-11-24T18:16:39+00:00	[thread overview]
Message-ID: <bWrwb.12329$sb4.3318@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <4948f537.0311240940.4737d3c2@posting.google.com>

shoko wrote:

> type Arr is Array(integer range<>) of Character;
> 
> function  Get_Text (Control : Multiline_Type;
>                     Line    : Natural := 0) return String is abstract;
> ----------------------------------------------------
> Now all i want to do is:
> 
> declare
>   a : Arr := Arr(Get_Text(value)); 
> begin
>   something;
> end;
> --------------------------------------
> 
> How can i convert abstract String to my ARR type?

You seem to have some confusion about "is abstract". Your understanding 
of basic Ada concepts seems to be poor. You should really work through 
some of the tutorials on www.adapower.com or an Ada textbook before 
trying to do this kind of stuff.

"is abstract" refers to the subprogram, not to String. An abstract 
subprogram cannot be called. You'll have to provide a non-abstract 
version of Get_Text.

-- 
Jeff Carter
"If you think you got a nasty taunting this time,
you ain't heard nothing yet!"
Monty Python and the Holy Grail
23




  reply	other threads:[~2003-11-24 18:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-24 18:11 amado.alves
replies disabled

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