Fsplit()

Fsplit() splits a floating number a into a whole number and decimal number. The whole number part is saved to variable b. b must be a single variable in memory (SRAM). The return value is the decimal part number of a. The sign is maintained.

Syntax: single = Fsplit( a as Single, byRef b as single )

Example:

  dim a,b as single
  a = 100.23
  a = Fsplit(a,b)  ' output: 0.23 and b: 100.0