fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

ordinal

choice.ordinal

Ordinal number corresponding to the index in this choice's open type
parameters of the type of the value stored in this choice.

Note that this is defined even for choices of ambiguous types like
`option nil`: Even though this type may only contain `nil` it can
still be distinguished:


is `0` while


is `1`.
Postcondition
post
  debug: 0 <= result < CHOICE_ELEMENT_TYPE.count
0.099dev (GIT hash bf4ead724d7f3fdab43a87b63c17477c916c8995)
last changed: 2026-11-04