> On Apr 12, 2017, at 10:06 PM, nore...@z505.com wrote:
> 
> The only way I can think of extending the functionality of a array is to put 
> it into an old borland object (on the stack) but that may not be what you are 
> looking for. Then you can give the array methods, effectively, possibly 
> reinventing TStringList ;-) and that array can be fixed, dynamic, whatever. 
> But as for generics, no, old borland style objects are not going to be 
> generic - so this email of mine is likely completely and utterly irrelavent 
> to your problem  domain :-)

My problem is I wanted a way to specify a static array size use generics, 
specifically so I could add methods to use on the array. It’s basically the 
same talk we’re having now but with static arrays, i.e. I want to add functions 
and build an API.

type
        generic TList<T,L> = record
                list: array[0..L-1];
                procedure Add (elem: T);
        end;


Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to