View source for Ifvar conditions - EDukeWiki

# View source for Ifvar conditions

← Ifvar conditions

You do not have permission to edit this page, for the following reasons:

- The action you have requested is limited to users in the group: Users.
- You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

'''ifvar'''<'''conditional'''> <[[gamevar]]> <constant><br> '''ifvarvar'''<'''conditional'''> <[[gamevar]]> <[[gamevar]]> Ifvar conditions are special [[if condition]]s that apply to [[gamevar]]s. These statements work by comparing the two inputs using the conditional provided as part of the command. If the resulting comparison or operation is true, the game will then execute the code specified. If only one CON command is to be performed, simply put it after the condition. For best reading, put it on the same line or on the following line, indented. For longer chains, enclose the code in curly braces ("{" and "}"). For performance reasons, do not use curly braces for single commands. [[Else]] statements can also be used. If you want to do nothing, followed by an else, in place of a command you can write <code>[[nullop]]</code> or <code>{ }</code>. {| {{prettytable}} !Conditional!!C/C++!!Math!!Description!! |- |e |== |= |equal to |- |l |< |< |less than |- |g |> |> |greater than |- |n |!= |&ne; |not equal to |- |and |& | |bitwise AND |- |or |<nowiki>|</nowiki> | |bitwise OR |- |xor |^ | |bitwise XOR |- |either |<nowiki>||</nowiki> | |logical OR: either are non-zero |} Since CON variables are integer-only, "less-than or equal to" (le, <=, &le;) and "greater-than or equal to" (ge, >=, &ge;) conditionals are unnecessary. {{varsuffix}} [[Category:Gamevar manipulation]] [[Category:If conditions]]

Templates used on this page:

- Template:Prettytable (view source)
- Template:Varsuffix (view source)

Return to Ifvar conditions.

Retrieved from "http://wiki.eduke32.com/wiki/Ifvar_conditions"