On 26 Nov 2011, at 16:10, Martin wrote:

> I know WriteStr can be used to get the names of enum: WriteStr(s, enumOne)

Plain Str also works: Str(enumOne,s).

> But should/could it also work on sub-range types of int?
> Like
>  TGraphicsColor = -$7FFFFFFF-1..$7FFFFFFF;
> 
> or even
> TFoo = type integer;

Do you mean Str(TGraphicsColor,s)? In that case: no, str/writestr cannot be 
used to get type names, variable names etc. They only support converting actual 
(ordinal, integer, floating point and enumeration) *values* to their 
corresponding string representations.


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

Reply via email to