An error not found in the reference


#1

Hi David ,

I was programming and got this error :
error: function is not an integer or float
I tried to look it up in the reference but could not find it.
(unless I overlooked it)
I found the cause of it meanwhile , but could you check this out please ?

Kind regards,
Ronny


#2

If an arithmetic function gets an argument that’s not a number, such as 'a, it gives the error:

> (+ 2.3 'a)
Error: 'a' is not an integer or float

However if the argument is nil there’s currently a bug that causes the error to say ‘function’ rather than ‘nil’; for example:

> (+ 2.3 nil)
Error: function is not an integer or float

I’m overhauling the error messages for the next release and this will be fixed as part of the update.


#3

This is now fixed as part of the overhaul of error messages in Version 2.8.


#4