Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Jonas Maebe
On 30 Aug 2010, at 15:14, Sven Barth wrote: Am 30.08.2010 15:04, schrieb Michael Van Canneyt: On Mon, 30 Aug 2010, Frank Church wrote: 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 i

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Sven Barth
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

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread 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; writest

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Graeme Geldenhuys
Op 2010-08-30 13:43, Frank Church het geskryf: > > Is there a way to pass the enum so that the type will not matter, so > that the type can be determined at runtime, so that it is not necessary > to create a new function for every type? I don't know... you might have to create a few overloaded fu

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Frank Church
On 30 August 2010 11:37, Graeme Geldenhuys wrote: > Op 2010-08-30 12:30, Frank Church het geskryf: > > Is there a subroutine that can convert an enum value to a strings, so > > that I can do something like ShowMessage(EnumToStr(enumValue))? > > > eg: > > function ObjectStateToString(AObjectState

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Sven Barth
Am 30.08.2010 12:37, schrieb Graeme Geldenhuys: Op 2010-08-30 12:30, Frank Church het geskryf: Is there a subroutine that can convert an enum value to a strings, so that I can do something like ShowMessage(EnumToStr(enumValue))? eg: function ObjectStateToString(AObjectState : TPerObjectState

Re: [fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Graeme Geldenhuys
Op 2010-08-30 12:30, Frank Church het geskryf: > Is there a subroutine that can convert an enum value to a strings, so > that I can do something like ShowMessage(EnumToStr(enumValue))? eg: function ObjectStateToString(AObjectState : TPerObjectState): string; begin result := GetEnumName(TypeInf

Re: [fpc-pascal] Local procedures as actual procedure parameter in macpas mode

2010-08-30 Thread Adriaan van Os
Marco van de Voort wrote: In our previous episode, leledumbo said: It could be a good start. Have you invited GPC people to contribute? They pretty much started the recent quo vadis threads excluding any form of merger/cooperation with FPC. The second message of Frank in that thread contai

[fpc-pascal] How can you convert an enum value to string?

2010-08-30 Thread Frank Church
Is there a subroutine that can convert an enum value to a strings, so that I can do something like ShowMessage(EnumToStr(enumValue))? -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lis