Is integer: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle Created page with '{{ #vardefine:name|is_numeric}}{{ #vardefine:return_type|boolean}}{{ FunctionPage| name={{#var:name}}| function_category=Math and Numbers| function1={{Function| name={{#var:nam…' |
imported>Heeheehee m moved Is numeric to Is integer: Function was renamed. |
(No difference)
|
Revision as of 23:31, 21 March 2010
needs(code_samples);
Function Syntax
boolean is_numeric(string check )
- check is the string to check
Returns true if a string consists of only digits and comma-separators, with a negative sign allowed as the first character. Note that all commas are ignored by this function (they don't have to follow the normal separation rules of once every three digits, and can even occur multiple times in a row; however, they cannot be the first character or this function will return false).
Special
This function does not return true for valid decimal numbers (the decimal point character causes a return value of false).
Attention KoLmafia Experts!
We need your help; some details of this function's operation are unknown or unclear.
The following specific question has been raised:
- Shouldn't this function be named is_integer() or similar, rather than is_numeric(), if decimals return false?