Returning the fraction / decimal / remainder part of a number

Previous topic - Next topic

FutureCow

I'm contributing this here because even though it's really simple, I was surprised there was no command to return it directly.

If you have a number (eg. 63.45) and want to return the ".45" part only it's as simple as
Code (glbasic) Select

FUNCTION FractionOnly : Number
Return (Number - INTEGER(Number))



mentalthink

Hi Future thanks for this simple but I think usefully code...  :good:

Kitty Hello