Is the problem having the enumeration at top level instead of inside a function? I do not believe it is possible to put an enumeration at function level, the enumeration defines a type, no? And types must be defined at top level.
1 Like