Go Down

Topic: The math function FLOOR is a reserve word without documentation. (Read 2105 times) previous topic - next topic

tinkermonkey

I looked for the math function "floor" in the Language Reference and found none. when I started to write my own floor function, I found the word floor was already reserved. I.E. lights up amber colored. Does anyone know if a floor function exists in an undocumented state? If so where can I find info on it? Should I just write my own using another name?

gardner

#1
Mar 15, 2011, 06:01 pm Last Edit: Mar 15, 2011, 06:09 pm by gardner Reason: 1
It should be there as soon as you #include <math.h>

http://www.nongnu.org/avr-libc/user-manual/group__avr__math.html#ga0f0bf9ac2651b80846a9d9d89bd4cb85

The syntax colouring in the IDE is based on a rule-set that is not connected to the actual compiler and libc, so do not assume that the colour coding necessarily means that something is genuinely "reserved" or defined or otherwise has a specific meaning.  It's a guideline and convenience more than anything.

tinkermonkey

Thanks that clears it up. I should have checked the libraries.

Go Up