if: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
back to [[Scripting_Reference#I|COMREF]]
<h2 style="color:#000066">'''if ''condition'''''</h2>
<h2 style="color:#000066">'''if ''condition'''''</h2>


'''Operand types:'''
'''Operand types:'''


condition: [[Boolean]]
'''condition:''' [[Boolean]]


'''Type of returned value:'''
'''Type of returned value:'''
Line 12: Line 15:


First part of if command.
First part of if command.


'''Example:'''
'''Example:'''


'''if''' (a>b) then {a=b}  
'''if''' (a>b) [[then]] {a=b}  
 


'''Comments'''
'''Comments'''


Comments by ''Roni''


Standard syntax = '''if''' a then b
Standard syntax = '''if''' a [[then]] b
Alternative syntax = '''?''' a : b
Alternative syntax = '''?''' a ''':''' b

Revision as of 19:20, 15 April 2006

back to COMREF

if condition


Operand types:

condition: Boolean

Type of returned value:

If Type

Description:

First part of if command.


Example:

if (a>b) then {a=b}


Comments


Standard syntax = if a then b Alternative syntax = ? a : b