2011/11/1 Juha Manninen <juha.mannine...@gmail.com>:
>>  WriteStr (S, N);
>
> Thanks guys!
> WriteStr() was the function I was looking for.
> I found some places in Lazarus code where it is used but not many. Martin's
> debugger code has some.
> I think many lookup string arrays in Lazarus code could be replaces
> with WriteStr. It would reduce code size and improve code maintenance.
> If I understand right WriteStr uses RTTI internally. So, every enum type
> already carries the string representation at run-time. The explicit lookup
> array is duplicate data.

It is a relatively new feature, since fpc 2.4.0 IIRC.

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

Reply via email to