FLI conversion of types
Is it possible in the FLI definition of a function to just force the conversion of numeric values to the proper type? For example, if I have the following foreign function:(define-foreign-function (rotate-object "RotateObject")
((pitch :float)
(yaw :float)
(roll :float))
...)
I can't call this with integer values:
(rotate-object 90 0 0) ; <-- error
One would think that LW could just do the conversion of types automatically. Now, for contant values, this isn't much of a problem, because I can just put .0 on the end of the numbers and now it works. But when I use symbols, since they can technically represent anything, I have to wrap them with (float ...) in order to force the conversion. Likewise, I have to use (truncate ...) for integer parameters.
Is there a way in the :lambda-list of the FLI definition to force (float) or (truncate)? If not, will future versions of LW just do this for me, please? :-)
Jeff M.
--
massung@gmail.com