passing an array to a generic function

From: Mr. J. (ratsonjaniv_at_hotmail.com)
Date: 11/21/03


Date: 21 Nov 2003 02:31:52 -0800

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.



Relevant Pages

  • Re: Rotated Text Help Needed
    ... Scalemode was set to vbInches only in the main character drawing routine. ... Private Type LOGFONT ... Private Sub RotateFont ... Dim log_font As LOGFONT ...
    (microsoft.public.vb.general.discussion)
  • Rotated Text Help Needed
    ... position the "glyph" rather than the character cell at the desired position ... Having carried out a quick check (using much larger font sizes) I can see ... Private Type LOGFONT ...
    (microsoft.public.vb.general.discussion)
  • Rotated Text Help Needed
    ... position the "glyph" rather than the character cell at the desired position ... Having carried out a quick check (using much larger font sizes) I can see ... Private Type LOGFONT ...
    (comp.lang.basic.visual.misc)
  • New: Paradise: A Gay Friendly Resort PBEM (free, open-ended, email, human, modern, rpg, abstract
    ... turn Paradise into the Pacific's premier gay resort. ... Private yacht the Angel and a fleet of sail boats, ... character by using any of the staff as a template. ...
    (rec.games.pbm)
  • Need Help converting int -> char -> string & TextArea display(!)
    ... display its contents character-by-character ... Please can someone show me how to read each character ... private TextArea inputTextArea; ... public void actionPerformed ...
    (comp.lang.java.help)