@@ -127,22 +127,29 @@ The function `:integer` operates identically to `:number`, except:
127
127
128
128
### Operands
129
129
130
- The operand of a number function is either a literal that matches the `number-literal`
131
- production in the [ABNF](/main/spec/message.abnf) and which is parsed by the
132
- implementation into a number; or an implementation-defined numeric type.
130
+ The _operand_ of a number function is either an implementation-defined numeric type or
131
+ a literal that matches the `number-literal` production in the [ABNF](/main/spec/message.abnf).
132
+ All other values produce a _Selection Error_ when evaluated for selection
133
+ or a _Formatting Error_ when attempting to format the value.
133
134
134
135
> For example, in Java, any subclass of `java.lang.Number` plus the primitive
135
136
> types (`byte`, `short`, `int`, `long`, `float`, `double`, etc.)
136
137
> might be considered as the "implementation-defined numeric types".
137
138
> Implementations in other programming languages would define different types
138
139
> or classes according to their local needs.
139
140
140
- Implementations MUST treat literals that do not match `number-literal` as
141
- non-numeric string literals.
142
- Non-numeric values, including non-numeric string literals, result in
143
- a _Selection Error_.
144
-
145
- > _Ed note:_ Alternatively we can require that non-numeric values result in `*`
141
+ > [!NOTE]
142
+ > String values passed as variables in the _formatting context_'s
143
+ > _input mapping_ can be formatted as numeric values as long as their
144
+ > contents match the `number-literal` production in the [ABNF](/main/spec/message.abnf).
145
+ >
146
+ > For example, if the value of the variable `num` were the string
147
+ > `-1234.567`, it would behave identically to the local
148
+ > variable in this example:
149
+ > ```
150
+ > .local $example = {|-1234.567| :number}
151
+ > {{{$num :number} == {$example}}}
152
+ > ```
146
153
147
154
### Options
148
155
0 commit comments