Skip to content

Commit 7e43bb5

Browse files
authored
Define non-negative integer option
@catamorphism identified this as a gap in e.g. #739. This PR defines what a non-negative integer option value is for `:number` and `:integer`. It does not attempt to address the larger question raised in 738/739.
1 parent 7a10ee2 commit 7e43bb5

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

spec/registry.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,15 @@ The following options and their values are required to be available on the funct
398398
- `never`
399399
- `min2`
400400
- `minimumIntegerDigits`
401-
- (non-negative integer, default: `1`)
401+
- ([non-negative integer](#non-negative-integer-options), default: `1`)
402402
- `minimumFractionDigits`
403-
- (non-negative integer)
403+
- ([non-negative integer](#non-negative-integer-options))
404404
- `maximumFractionDigits`
405-
- (non-negative integer)
405+
- ([non-negative integer](#non-negative-integer-options))
406406
- `minimumSignificantDigits`
407-
- (non-negative integer)
407+
- ([non-negative integer](#non-negative-integer-options))
408408
- `maximumSignificantDigits`
409-
- (non-negative integer)
409+
- ([non-negative integer](#non-negative-integer-options))
410410
411411
> [!NOTE]
412412
> The following options and option values are being developed during the Technical Preview
@@ -515,9 +515,9 @@ function `:integer`:
515515
- `always`
516516
- `min2`
517517
- `minimumIntegerDigits`
518-
- (non-negative integer, default: `1`)
518+
- ([non-negative integer](#non-negative-integer-options), default: `1`)
519519
- `maximumSignificantDigits`
520-
- (non-negative integer)
520+
- ([non-negative integer](#non-negative-integer-options))
521521
522522
> [!NOTE]
523523
> The following options and option values are being developed during the Technical Preview
@@ -619,7 +619,17 @@ All other values produce an _Invalid Expression_ error.
619619
> or the type `com.ibm.icu.util.CurrencyAmount` can be used to set the currency and related
620620
> options (such as the number of fraction digits).
621621
622+
### Non-Negative Integer Options
622623
624+
Some _options_ of number _functions_ are defined to take a "non-negative integer".
625+
In most cases, these control the number of various kinds of digits.
626+
627+
A "non-negative integer" is one of:
628+
- an implementation-defined integer numeric type where the value of the
629+
encoded number is not less than zero
630+
- a literal consisting only of ASCII digits U+0030 through U+0039;
631+
An implementation MAY define an upper limit on the length of such a literal
632+
or of the value encoded by such a literal.
623633
624634
### Number Selection
625635

0 commit comments

Comments
 (0)