Re: [fpc-pascal] Class const of array of record.

2012-02-24 Thread Jonas Maebe
On 24 Feb 2012, at 14:28, Everton Vieira wrote: type TTest = class const Nomes: array[0..2] of TRec = (mTRec(1, 'everton'), mTRec(2, 'murilo'), mTRec(3, 'vieira')); end; See http://www.freepascal.org/docs-html/ref/refse22.html (the syntax is the same for typed constants and initialized

[fpc-pascal] Class const of array of record.

2012-02-24 Thread Everton Vieira
I was trying to make this construction: type TRec = record Numero: Integer; Nome: String; end; function mTRec(Numero: Integer; Nome: String): TRec; type TTest = class const Nomes: array[0..2] of TRec = (mTRec(1, 'everton'), mTRec(2, 'murilo'), mTRec(3, 'vieira')); end; imple