[fpc-devel] generics

Michael Schnell mschnell at lumino.de
Wed Dec 20 14:11:15 CET 2006


> Will fpc support generic record declarations like this:
>
> type
>   generic TFixedKeyNode<KeySize> = record
>     key: array[0..KeySize-1] of char;
>     value: dword;
>   end;
>
> In other word the type is not parameterized by another type but by an 
> integer used to define the upper limit of an array.
>
Free Pascal seems to support macros (I did not try yet): 
http://www.freepascal.org/docs-html/prog/progse5.html

With this compile-time variable typedefs should be doable.

-Michael



More information about the fpc-devel mailing list