fi-0017: Ordinal out of bound {:#fi-0017}

Ordinals for tables and Unions must be valid unsigned 32 bit integers. Negative ordinals or ordinals greater than 4,294,967,295 will cause this error.

{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0017-a.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

{% include “docs/reference/fidl/language/error-catalog/label/_bad.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/bad/fi-0017-b.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

To fix this error, ensure that all ordinals are in the allowed range.

{% include “docs/reference/fidl/language/error-catalog/label/_good.md” %}

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="tools/fidl/fidlc/tests/fidl/good/fi-0017.test.fidl" exclude_regexp="\/\/ (Copyright 20|Use of|found in).*" %}

Note: Tables are limited to 64 ordinals and are ordinals are required to be dense (sequential starting from 1), so the actual limit for table ordinals is 64. Specifying a negative ordinal or an ordinal larger than 4,294,967,295 will cause this error, fi-0017: Ordinal Out of Bound. Specifying an ordinal between 65 and 4,294,967,295 will cause either fi-0092: Too Many Table Ordinals if there are no missing ordinals or fi-0100: Ordinals Must Be Dense if there are any missing ordinals.

Note: Union ordinals are required to be dense (sequential starting from 1), so specifying large numbers as ordinals is not possible unless you actually have that many variants. If an ordinal larger than 4,294,967,295 is specified, it will cause this error, fi-0017: Ordinal Out of Bound]. If a large ordinal is specified without the union also having every other ordinal between 1 and that value, it will cause fi-0100: Ordinals Must Be Dense.