comp.lang.ada
 help / color / mirror / Atom feed
* passing an array to a generic function
@ 2003-11-21 10:31 Mr. J.
  2003-11-21 11:03 ` Lutz Donnerhacke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mr. J. @ 2003-11-21 10:31 UTC (permalink / raw)


hi,

this is my generic function:

generic
   type Index is (<>);
   type Item is private;
   type Arr is array(Index range <>) of Item;
   with function "="(I1,I2 : Item) return Boolean is <>;
   
   function Filter_Array(A: Arr) return Arr;

Now, I wanna write a create a Filter_String function according to it:

   type Index is new Integer;
   type Item is new Character;
   type Arr is Array(1..23) of character;
   
   function Filter_String is new Filter_Array(Index,Item,Arr,"=");

As U all experts guessed it won't compile, my question is how to pass
the array of character to my new function ?

10x,
J.



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

end of thread, other threads:[~2003-11-21 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-21 10:31 passing an array to a generic function Mr. J.
2003-11-21 11:03 ` Lutz Donnerhacke
2003-11-21 11:20 ` David C. Hoos
2003-11-21 11:35 ` Jean-Pierre Rosen

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