assert: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|ASSERT]]
{{Command|= Comments
[[Category:Scripting Commands ArmA|ASSERT]]
____________________________________________________________________________________________


| arma |= Game name


<h2 style="color:#000066">''' assert ''condition'''''</h2>
|2.00|= Game version
____________________________________________________________________________________________


| Tests a condition and if the condition is false, halts the program. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| '''assert''' condition |= Syntax


'''condition:''' [[Boolean]]
|p1= condition: [[Boolean]] |= Parameter 1


'''Type of returned value:'''
| [[Boolean]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>assert (_x>0)</pre> |= Example 1
____________________________________________________________________________________________


[[Boolean]]
|  |= See also


'''Compatibility:'''
}}


Version 2.00 required.
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Description:'''
<!-- Note Section END -->
</dl>


Tests a condition and if the condition is false, halts the program.
<h3 style="display:none">Bottom Section</h3>


 
[[Category:Scripting Commands|ASSERT]]
'''Example''':
[[Category:Scripting Commands ArmA|ASSERT]]
   
'''assert''' (_x>0)

Revision as of 22:03, 1 August 2006

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

Description

Description:
Tests a condition and if the condition is false, halts the program.
Groups:
Uncategorised

Syntax

Syntax:
assert condition
Parameters:
condition: Boolean
Return Value:
Boolean

Examples

Example 1:
assert (_x>0)

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

Bottom Section