# Enum values

**URL:** <https://forum.crystal-lang.org/t/enum-values/4496>\
**Category:** Help & Support\
**Created:** [March 21, 2022, 1:04pm UTC](https://forum.crystal-lang.org/t/enum-values/4496 "2022-03-21T13:04:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon69898395](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@anon69898395](https://forum.crystal-lang.org/u/anon69898395)\
**Post date:** [March 21, 2022, 1:04pm UTC](https://forum.crystal-lang.org/t/enum-values/4496/1 "2022-03-21T13:04:30Z")

</div>

Hello everyone,

Is it possible to define my enum’s values?  
For example in order to start my enum not with 0 (but maybe 100 or whatever), or in order to skip values (like maybe having some options with values -1, 0, 5, 6 and 7, but without options equivalent to 1, 2, 3, 4)

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [March 21, 2022, 1:09pm UTC](https://forum.crystal-lang.org/t/enum-values/4496/2 "2022-03-21T13:09:10Z")

</div>

Checkout [Enums - Crystal](https://crystal-lang.org/reference/1.3/syntax_and_semantics/enum.html). It has some examples of how the default values can be overridden, as well as changing the “type” of the enum.

---

<div class="post-metadata">

**Author:** ![anon69898395](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@anon69898395](https://forum.crystal-lang.org/u/anon69898395)\
**Post date:** [March 21, 2022, 1:19pm UTC](https://forum.crystal-lang.org/t/enum-values/4496/3 "2022-03-21T13:19:08Z")

</div>

Oh, thanks!

This should probably be added to the API as well (it says it can be overwritten, but without any more details or examples).

> changing the “type”  
> You even answered my next question already! Thanks!

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [March 21, 2022, 1:25pm UTC](https://forum.crystal-lang.org/t/enum-values/4496/4 "2022-03-21T13:25:07Z")

</div>

> [@anon69898395](#):
>
> This should probably be added to the API

PRs are welcome 🙂.

Tho this does bring up the question of how to handle things like this that exist in both API and reference material. E.g. what should be included in each place, what should be in both, should one be favored over the other, etc.
