a less= b: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|sortKey= #


|1.00
|game1= ofp
 
|version1= 1.00


|gr1= Math
|gr1= Math
|gr2= Variables
|gr2= Variables


| Returns [[true]] if '''a''' is less than or equal to '''b''', else returns [[false]].
|descr= Returns [[true]] if '''a''' is less than or equal to '''b''', else returns [[false]].


| a '''<{{=}}''' b
|s1= a [[a less= b|<=]] b


|p1= a: [[Number]]
|p1= a: [[Number]]
Line 16: Line 18:
|p2= b: [[Number]]
|p2= b: [[Number]]


| [[Boolean]]
|r1= [[Boolean]]


|x1= <code>[[if]] ([[fuel]] truck1 <{{=}} 0) [[then]] {[[hint]] "Truck1 has no fuel left."}</code>
|x1= <code>[[if]] ([[fuel]] truck1 [[a less= b|<=]] 0) [[then]] {[[hint]] "Truck1 has no fuel left."}</code>


| [[Operators]]
|seealso= [[Operators]]
}}
}}


 
[[Category:Scripting Commands OFP 1.46]]
[[Category:Scripting Commands|#]]
[[Category:Scripting Commands OFP 1.96]]
[[Category:Scripting Commands OFP 1.99|#]]
[[Category:Scripting Commands OFP 1.99]]
[[Category:Scripting Commands OFP 1.96|#]]
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands OFP 1.46|#]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma1|Scripting Commands|sortKey=#}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands|sortKey=#}}
{{GameCategory|arma3|Scripting Commands|sortKey=#}}

Revision as of 22:54, 16 February 2021

Hover & click on the images for description

Description

Description:
Returns true if a is less than or equal to b, else returns false.
Groups:
MathVariables

Syntax

Syntax:
a <= b
Parameters:
a: Number
b: Number
Return Value:
Boolean

Examples

Example 1:
if (fuel truck1 <= 0) then {hint "Truck1 has no fuel left."}

Additional Information

See also:
Operators

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