<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Martok <<a href="mailto:listbox@martoks-place.de" target="_blank" rel="noreferrer">listbox@martoks-place.de</a>> schrieb am Mo., 23. Juli 2018, 17:15:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 23.07.2018 um 17:05 schrieb Sven Barth via fpc-pascal:<br>
> Is this kind of enumerated type with constant assignment not supported<br>
> by FPC 3.0.4?<br>
> <br>
> TMonthType = (January=1, February, May=5,June, July);<br>
> <br>
> <br>
> The enumeration type itself is supported, however TypeInfo() and thus<br>
> GetEnumName() and friends are not. <br>
Instead of GetEnumName, you may use ReadStr and WriteStr - the IO functions use<br>
their separate tables, which are generated correctly even for enums with<br>
assignments.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">Though you'll get an access violation if you use a value that's not part of the enum (in the example this will happen when the loop reaches the value 3).</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>