<numberList>
<numberList>
defines a collection, or list, of <number>
components. Some
components that accept a <numberList>
as an input include <function>
, <repeat>
,
and <award>
.
Attributes and Properties
Attribute | Type | Values |
---|---|---|
asList = "…" | "true" "false" | |
displayDecimals = "…" | ||
displayDigits = "…" | ||
displaySmallAsZero = "…" | ||
maxNumber = "…" | number | |
padZeros = "…" | ||
unordered = "…" | boolean | "true" "false" |
Property | Type |
---|---|
$n.maxNumber | number |
$n.numComponents | number |
$n.numValues | number |
$n.unordered | boolean |
Example: Defining a <numberList>
and retrieving a value
The <numberList>
component stores a list of “numbers”,
or <number>
components. Array notation can be used to access an individual element in the list.
Example: A <numberList>
from multiple <mathInput/>
components
Combining a number of user-inputs into a <numberList>
can be achieved by
referencing the named component between the opening and closing tags, separated by spaces.
Example: A <numberList>
for function evaluation
Here, a <numberList>
stores multiple input values to be used in the subsequent code for function evaluation.
Attribute Example: unordered
If a <numberList>
is defined with the unordered
attribute,
comparisons (for validation in an <award>
or a <boolean>
for example) are unordered automatically.
Attribute Example: maxNumber
The maxNumber
attribute imposes a limit on the number of numbers that can be stored in the list.
Property Example: numComponents
The numComponents
property returns the number of elements stored in a <numberList>
.