finite: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Boolean]] <nowiki>=</nowiki> '''finite''' x |SYNTAX=
| [[finite]] number |SYNTAX=


|p1= x: [[Number]] |PARAMETER1=
|p1= number: [[Number]] |PARAMETER1=


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>finite 10/0 .... result is false</pre> |EXAMPLE1=
|x1= <code>[[finite]] 10/0; {{cc|returns false}}</code> |EXAMPLE1=
|x1= <pre>?!finite 10/0 : hint "Infinite"</pre> |EXAMPLE1=


|x2= <code>[[if]] ([[not]] [[finite]] 10/0) [[then]] { [[hint]] "Infinite"; };</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


|  |SEEALSO=
|  |SEEALSO=
}}
}}


Line 29: Line 28:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 27 Sep, 2013
<dd class="notedate">Posted on 27 Sep, 2013
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]'''<dd class="note">
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]
<dd class="note">
Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:
Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:
<code>//ArmA 2
<code>{{cc|{{arma2}}}}
[[hint]] [[str]] [[finite]] (10/0); //true ... O_o Huh????
[[hint]] [[str]] [[finite]] (10/0); {{cc|true ... O_o Huh????}}
[[hint]] [[str]] (10/0); //0 ... Weird, but that explains it.
[[hint]] [[str]] (10/0); {{cc|0 ... Weird, but that explains it.}}
//ArmA 3
[[hint]] [[str]] [[finite]] (10/0); // Error Zero Divisor
[[hint]] [[str]] [[finite]] 10; //true
[[hint]] [[str]] [[finite]] 1000000000000000000000000000000000000000; //false</code>


{{cc|{{arma3}}}}
[[hint]] [[str]] [[finite]] (10/0); {{cc|Error Zero Divisor}}
[[hint]] [[str]] [[finite]] 10; {{cc|true}}
[[hint]] [[str]] [[finite]] 1000000000000000000000000000000000000000; {{cc|false}}</code>


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 23:57, 4 September 2019

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
True, if number is finite (not infinite and a valid number)
Groups:
Uncategorised

Syntax

Syntax:
finite number
Parameters:
number: Number
Return Value:
Boolean

Examples

Example 1:
finite 10/0; // returns false
Example 2:
if (not finite 10/0) then { hint "Infinite"; };

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on 27 Sep, 2013
Killzone_Kid
Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect: // Arma 2 hint str finite (10/0); // true ... O_o Huh???? hint str (10/0); // 0 ... Weird, but that explains it. // Arma 3 hint str finite (10/0); // Error Zero Divisor hint str finite 10; // true hint str finite 1000000000000000000000000000000000000000; // false

Bottom Section