Re: [fpc-pascal] Generics problem/question

2010-01-07 Thread leledumbo

> I tried that, but it didn't work

Are you sure? Can you compile the attached program (See TicTacToe unit)? I
only define = operator and it works.
http://old.nabble.com/file/p27056857/TicTacToeAI.zip TicTacToeAI.zip 
-- 
View this message in context: 
http://old.nabble.com/Generics-problem-question-tp27036004p27056857.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Generics problem/question

2010-01-07 Thread leledumbo

Sorry, I guess I was wrong. The specialization in my program uses a class
instead of a record, the = operator is defined for a record but isn't used
at all. I'm not sure where the problem is, only records and static arrays
causes it.

One solution is to declare a pointer type to your record and specialize
TFPGList with it.

-- 
View this message in context: 
http://old.nabble.com/Generics-problem-question-tp27036004p27070857.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal