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 a68bce9af280552faedee34cd5433dc10b6454de)
last changed: 2026-10-14