Value float or Integer?
Hello,
How can I check if a value is a float or if it's an integer? I need something similar like the PHP Function: is_float($x) and is_int($x) http://php.net/manual/en/function.is-float.php http://php.net/manual/en/function.is-int.php Thanks in advance |
Re: Value float or Integer?
Give a context/code where you need that.
|
Re: Value float or Integer?
Situation #1:
Code:
Code:
In this case, you would need to add another parameter to specify if the provided value is float or integer. Situation #2: Trying to determine if a string is a float or integer. Code:
|
Re: Value float or Integer?
Thanks for your replys, but these can't help me. I should provide more information I guess.
I'm trying to add it into a calculator I made, http://forums.alliedmods.net/showthread.php?t=172415 PHP Code:
|
Re: Value float or Integer?
In CS it could be something like:
PHP Code:
so: 5.2 != 5.0 Means its a float |
Re: Value float or Integer?
You forgot an ), Exolent :)
|
Re: Value float or Integer?
Quote:
|
Re: Value float or Integer?
Quote:
|
Re: Value float or Integer?
Quote:
|
| All times are GMT -4. The time now is 00:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.