PCast
Constants for casting operations. We cast constants on top of the stack. The stack is a stack of bytes. A cast operation takes the top n bytes and casts them to a different type.
Syntax of the cast byte: We can write the cast byte as 0xXY in hexadecimal where X is the type we cast from and Y is the type we cast to. It will be interpreted as follows: Read type X from the stack and cast it to type Y. Write the result back to the stack.
Cast operations will change the size of the stack (if the size of the type we cast to is different from the size of the type we cast from).
Get more information about the cast byte in the PCast Bytecode Specification
Since
0.1.0
Properties
Cast from a byte to a byte
Cast from a byte to a double
Cast from a byte to a float
Cast from a byte to an int
Cast from a byte to a long
Cast from a byte to a short
Cast from a byte to an unsigned byte
Cast from a byte to an unsigned int
Cast from a byte to an unsigned long
Cast from a byte to an unsigned short
Cast from a double to a byte
Cast from a double to a double
Cast from a double to a float
Cast from a double to an int
Cast from a double to a long
Cast from a double to a short
Cast from a double to an unsigned byte
Cast from a double to an unsigned int
Cast from a double to an unsigned long
Cast from a double to an unsigned short
Cast from a float to a byte
Cast from a float to a double
Cast from a float to a float
Cast from a float to an int
Cast from a float to a long
Cast from a float to a short
Cast from a float to an unsigned byte
Cast from a float to an unsigned int
Cast from a float to an unsigned long
Cast from a float to an unsigned short
Cast from an int to a byte
Cast from an int to a double
Cast from an int to a float
Cast from an int to an int
Cast from an int to a long
Cast from an int to a short
Cast from an int to an unsigned byte
Cast from an int to an unsigned int
Cast from an int to an unsigned long
Cast from an int to an unsigned short
Cast from a long to a byte
Cast from a long to a double
Cast from a long to a float
Cast from a long to an int
Cast from a long to a long
Cast from a long to a short
Cast from a long to an unsigned byte
Cast from a long to an unsigned int
Cast from a long to an unsigned long
Cast from a long to an unsigned short
Cast from a short to a byte
Cast from a short to a double
Cast from a short to a float
Cast from a short to an int
Cast from a short to a long
Cast from a short to a short
Cast from a short to an unsigned byte
Cast from a short to an unsigned int
Cast from a short to an unsigned long
Cast from a short to an unsigned short
Cast from an unsigned byte to a byte
Cast from an unsigned byte to a double
Cast from an unsigned byte to a float
Cast from an unsigned byte to an int
Cast from an unsigned byte to a long
Cast from an unsigned byte to a short
Cast from an unsigned byte to an unsigned byte
Cast from an unsigned byte to an unsigned int
Cast from an unsigned byte to an unsigned long
Cast from an unsigned byte to an unsigned short
Cast from an unsigned int to a byte
Cast from an unsigned int to a double
Cast from an unsigned int to a float
Cast from an unsigned int to an int
Cast from an unsigned int to a long
Cast from an unsigned int to a short
Cast from an unsigned int to an unsigned byte
Cast from an unsigned int to an unsigned int
Cast from an unsigned int to an unsigned long
Cast from an unsigned int to an unsigned short
Cast from an unsigned long to a byte
Cast from an unsigned long to a double
Cast from an unsigned long to a float
Cast from an unsigned long to an int
Cast from an unsigned long to a long
Cast from an unsigned long to a short
Cast from an unsigned long to an unsigned byte
Cast from an unsigned long to an unsigned int
Cast from an unsigned long to an unsigned long
Cast from an unsigned long to an unsigned short
Cast from an unsigned short to a byte
Cast from an unsigned short to a double
Cast from an unsigned short to a float
Cast from an unsigned short to an int
Cast from an unsigned short to a long
Cast from an unsigned short to a short
Cast from an unsigned short to an unsigned byte
Cast from an unsigned short to an unsigned int
Cast from an unsigned short to an unsigned long
Cast from an unsigned short to an unsigned short