Help Contents / Arithmetic / Type Converters / Int8

Int8 num

outputs a 8 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 Int8 127	;127 
	show Int8 128	;  int8 doesn't like 128 as input 
	show Int8 -128	;-128 
	show Int8 -129	;  int8 doesn't like -129 as input 
	show Int8 [1.2 -1.2 1.9 -1.9]	;[1 -1 1 -1] 
	show Int8 {1.2 -1.2 1.9 -1.9}	;{1 -1 1 -1} 


previous: Int16	next: UInt8
