Type Casts
Sometimes it is useful to directly cast a type to another one. Spice offers type casting for some type combinations. Additionally, the casting operator can always be applied when the source type matches the cast destination type.
Usage¶
Casting an int to the short data type:
Example for casting for a function call: