1. enum type
- Posted by irv 1 week ago
- 195 views
From the docs:
enum type color RED=4, GREEN=7, BLACK=1, BLUE=3 , PINK=10 end type ? color(RED) --> 1 ? color(GREEN) --> 2 ? color(BLACK) --> 3 ? color(BLUE) --> 4 ? color(PINK) --> 5 constant color_names = {"rouge", "vert", "noir", "bleu", "rose"} puts(1, color_names[color(BLUE)]) --> bleu
In real life:
irv@irv-desktop:~/new_gtk$ eui enums.ex 1 1 1 1 1 rouge
Euphoria Interpreter v4.2.0 development 64-bit Linux, Using System Memory Revision Date: 2025-01-24 03:31:36, Id: 22b5124
2. Re: enum type
- Posted by ChrisB (moderator) 1 week ago
- 143 views
Hi Irv
So this works as expected on My Win system (not your IRL)
Incidentally, it looks like enum overrides the assignments for a list of variables - is this expected behaviour?
Cheers
Chris
3. Re: enum type
- Posted by jmduro 1 week ago
- 133 views
irv said...
In real life:
irv@irv-desktop:~/new_gtk$ eui enums.ex 1 1 1 1 1 rouge
Euphoria Interpreter v4.2.0 development 64-bit Linux, Using System Memory Revision Date: 2025-01-24 03:31:36, Id: 22b5124
Same for me on Windows X64 with same release 4.2.0 development.
Jean-Marc