Returning values from functions

Blitz3D Forums/Blitz3D Programming/Returning values from functions

Hi all!
This might seem like a bit of a stupid question, but how do I return REAL values from functions?

This is what i've got:

e.g.

time# = 0.0
Global Ai# = Rnd(-50, 50) / 100
Global Bi# = Rnd(-50, 50) / 100

Print pathX(time)

Function pathX(t#)
xCoord# = Ai * t^2 + Bi * t

Return xCoord#
End Function

This is just an extract of my code - when I print the value of pathX(time), no matter what time I use I only get integer values.
Any help would be greatly appreciated! Thanks!