Int16

HC Arithmetic Type Converters Int16
Int Int8

Int16 num


outputs a 16 bit integer whose value is num with its fractional part truncated. This is mainly interesting when writing to binary files or defining a Struct and then writing that to a binary file.

Examples:

show Int16 32767	;32767
show Int16 32768	;  int16 doesn't like 32768 as input
show Int16 -32768	;-32768
show Int16 -32769	;  int16 doesn't like -32769 as input
show Int16 [1.2 -1.2 1.9 -1.9]	;[1 -1 1 -1]
show Int16 {1.2 -1.2 1.9 -1.9}	;{1 -1 1 -1}

Examples:

References:

Int Int8