To - Function SummarySummary:Constructs and returns a new value after conversion. Usage:to type spec Arguments:type - The datatype or example value. (must be: any-type) spec - The attributes of the new value. (must be: any-type) Description:Every datatype provides a TO method to allow conversions from other datatypes. The to-binary, to-block, and all other to- functions are mezzanine functions that are based on this TO function. Here are a few examples:
The TO function lets the target datatype be specified as an argument, allowing you to write code such as:
The conversions that are allowed depend on the specific datatype. Some datatypes allow special conversions, such as:
Related:make - Constructs and returns a new value.
| |||||||
|