|
|
| Author |
Message |
stevech
Joined: 23 Feb 2006
Posts: 688
|
|
Posted: 21 September 2006, 4:58 AM Post subject: enum eee ' an enum type |
|
|
can structures contain enum types?
(subtitle: what have I done wrong?)
| Code: |
enum eee ' an enum type
alpha
beta
end enum
structure foo ' a structure containing an enum type
dim x as byte
dim it as eee
end structure
dim bar as foo ' instance of a structure
dim an_eee as eee ' instance of an enum type as module global
sub main()
an_eee = alpha ' works OK
bar.x = 1
bar.it = alpha ' gives assignment error, type conflict
end sub
|
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 21 September 2006, 22:25 PM Post subject: Re: enum eee ' an enum type |
|
|
| stevech wrote: | | can structures contain enum types?(subtitle: what have I done wrong?) |
Your example should compile but, as you observed, it does not.
The cause of the error has been found and a solution identified. We should be able to get this change into the soon-to-be-released next version. |
|
| Back to top |
|
 |
stevech
Joined: 23 Feb 2006
Posts: 688
|
|
Posted: 21 September 2006, 23:49 PM Post subject: |
|
|
| thanks a zillion. no rush. |
|
| Back to top |
|
 |
|