Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated documentation for base type for enum #673

Closed
Mingun opened this issue Jan 11, 2020 · 3 comments
Closed

Outdated documentation for base type for enum #673

Mingun opened this issue Jan 11, 2020 · 3 comments

Comments

@Mingun
Copy link

Mingun commented Jan 11, 2020

Last paragraph in https://doc.kaitai.io/user_guide.html#enums states:

We add enum: …​ parameter to every attribute that’s going to be represented by that enum, instead of just being a raw integer. Note that such attributes must have some sort of integer type in the first place (i.e. type: u* or type: s*).

Emphasized is not true. Enums can also be based on strings

@GreyCat
Copy link
Member

GreyCat commented Jan 11, 2020

Can you elaborate more? To my knowledge, enums in KS are always integers.

@KOLANICH
Copy link

#434

@Mingun
Copy link
Author

Mingun commented Jan 11, 2020

Ah, I confused them with cases in switch-on, where strings is acceptable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants