a == b: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
'''Example:''' | '''Example:''' | ||
[ [[[ | |||
? [ [[[(player]] '''==''' ([[leader]] [[group]] player]])):[[hint]] "You are the leader of your group." | |||
? ([[name]] [[player]] '''==''' "Billy"):[[hint]] "Hello Billy, how are you?" | ? ([[name]] [[player]] '''==''' "Billy"):[[hint]] "Hello Billy, how are you?" | ||
Line 28: | Line 28: | ||
'''Comments:''' | '''Comments:''' | ||
Does not work with the types [[Boolean]] and [[Array]]. | |||
i.e. the arguments: | i.e. the arguments: |
Revision as of 14:31, 19 April 2006
back to COMREF
valuea == valueb
Operand types:
valuea: Number, Group, Side, String or Object
valueb: Number, Group, Side, String or Object
Type of returned value:
Description:
check if valuea is equal to valueb
Example:
? [ [[[(player]] == (leader group player]])):hint "You are the leader of your group."
? (name player == "Billy"):hint "Hello Billy, how are you?"
Comments:
Does not work with the types Boolean and Array.
i.e. the arguments:
? MyBoolean == [] : hint "This is a test."
and
? MyArray == [] : hint "This is a test."
...will cause errors.
Instead of the first line use:
? MyBoolean : hint "This is a test."
The workaround for the second line is:
? (count MyArray) == 0 : hint "This is a test."