Questions Concepts
GitHub icon


Enums - language feature

< >
Example from C, C++, Objective-C, Tick C:
enum Gender { Male, Female, };
enum Direction { Up, Down }
Example from GraphQL:
enum Episode { NEWHOPE EMPIRE JEDI }
Example from C3:
enum TestEnum : int { FOO, BAR, BAZ }
Example from 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
Example from Jule:
enum ExitCode { Success = 0, Failure = 1 }
Example from Grammar:
boolCell enum true false

Languages with Enums include C, C++, TypeScript, Objective-C, GraphQL, C3, Speedie, Jule, Grammar, C2, Tick C, Static Typescript

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

This question asks: Does the language have a syntax and type for enums?

Read more about Enums on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 Logout