Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Enums

< >
Example from 1 languages: C
enum Gender { Male, Female, };
Example from 1 languages: TypeScript
enum Direction { Up, Down }
Example from 1 languages: GraphQL
enum Episode { NEWHOPE EMPIRE JEDI }
Example from 1 languages: Chapel
enum color { red, green, blue=3 };
Example from 1 languages: C3
enum TestEnum : int { FOO, BAR, BAZ }
Example from 1 languages: MoonBit
enum Relation { Smaller Greater Equal }
Example from 1 languages: Parsers
boolCell enum true false
Example from 1 languages: Jule
enum ExitCode { Success = 0, Failure = 1 }
Example from 1 languages: Speedie
flags A B C D // A=1, B=2, C=4, D=8 constants X Y Z W // X=0, Y=1, Z=3, W=4
*

Languages with Enums include C, TypeScript, GraphQL, Chapel, C3, MoonBit, C2, Parsers, Jule, Speedie

*

Languages without Enums include JavaScript, Python, HTML, CSS, Ruby

*

View all concepts with or missing a hasEnums measurement

*

Read more about Enums on the web: 1.

- Build the next great programming language Add Issues About Search Keywords Livestreams Labs Resources Acknowledgements