How do I make a custom enum in VEX?
2015
3
0
-
- DASD
- Member
![](https://static.sidefx.com/djangobb_forum/img/authority/vote8.png)
- 453 posts
- Joined: 2月 2013
- Offline
I imagine the code would be something like:
enum days{
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
};
enum day = tuesday;
But I don't seem to be able to get it to work.
Can anybody tell me what I might be missing and how my syntax is wrong?
Edited by DASD - 2018年10月29日 23:09:51
-
- N-G
- Member
![](https://static.sidefx.com/djangobb_forum/img/authority/vote7.png)
- 209 posts
- Joined: 3月 2018
- Offline
hi.
You can't do this in VEX it's for C and C++ languages.
You can achieve that with compiler directives.
#define days int
#define monday 1
#define tuesday 2
etc...
days day = monday;
-
- DASD
- Member
![](https://static.sidefx.com/djangobb_forum/img/authority/vote8.png)
- 453 posts
- Joined: 2月 2013
- Offline
Thank you!