Am 30.08.2010 15:04, schrieb Michael Van Canneyt:
On Mon, 30 Aug 2010, Frank Church wrote:
Is there a subroutine that can convert an enum value to a strings, so
that I
can do something like ShowMessage(EnumToStr(enumValue))?
Just use writestr ?
program testw;
type
mytype = (a,b,c);
var
d : mytype;
s : string;
begin
d:=a;
writestr(s,d);
writeln(s);
end.
This works in trunk, and I think that even str() works with enumerateds in
trunk.
WriteStr already worked in 2.4.0 as well.
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal