Thamm, Russell wrote:
Yes, that's true. I came across this problem as well recently.
Hmpf... this problem was fixed for schema, pointer and record types, but apparently not for enum types. :-( I added it to the bug list. Anyway, Peter is working on a new GPI format which will hopefully get rid of this kind of bugs (there are a few more of them) altogether...
I can't even seem to find a workaround for this (apart from abandoning the user-defined type).
Perhaps some type-casting to Integer and back will help, but it's not nice...
Perhaps it's better, until the bug is fixed, to turn the enum type into an integer:
type RRtype = Integer;
const rr_one = 0; rr_two = 1; ...
Not very nice, either, but then there's ugliness only in one place -- but of course, you lose some degree of type-safety...
Frank
-- Frank Heckenbach, frank@fjf.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan