list
| Syntax |
list (value)
|
| Params |
value is the object whose datatype you wish to convert to listType.
|
| Action |
Converts value to a list representation. In most cases, this is a single-item list containing the original value.
|
| Returns |
The resulting list if coercion is successful, an error condition otherwise.
|
| Examples |
list (12) » {12}
list (clock.now ())
In this example, the date type of the list item is dateType; it is displayed as a string for readability.
The point.set verb creates an object of datatype point, which is coerced to a list of two numbers. |
| Notes |
Most scalar values coerces to a single-item list containing that value Point, rgb and rectangle values coerce to a list of 2, 3 and 4 numbers respectively, representing the fields in their record structures.
|
| See Also |
for ... in
|