98 of 307
ZBasic System Library 88 ZX Microcontroller Family FixI Type Function returning Integer Invocation FixI(arg) Parameter Method Type Description arg ByVal Single The value to be changed to integral form. Discussion The supplied Single value is first converted to a signed 32-bit integer, rounding toward zero, and then the low 16 bits of that value is returned. The result isn’t particularly useful if the provided Single value is outside the range –32768 to 32767, inclusive. Example Dim i as Integer i = FixI(-100.5) ' result is -100 Compatibility For compatibility with BasicX, if the provided Single value is larger than 32767 this function returns 32767. Similarly, if the value is less than –32767 (not –32768 as one would expect) this function returns –32767.