Input Syntax: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! scope="col" | Token | |||
! scope="col" | Explanation | |||
! scope="col" | Example usage | |||
|----------- | |||
! ''`'' | |||
| The backtick is used in cases where the expression is ambiguous. | |||
| <code>Button 1</code> results in a syntax error, because the expression is ambiguous. Adding backticks around the button name makes it able to be parsed correctly: <code>`Button 1`</code> | |||
|----------- | |||
! ''|'' | ! ''|'' | ||
| The expression is true if the left-hand side (LHS) or the right-hand side (RHS) are true. (This is not an exclusive OR.) | | The expression is true if the left-hand side (LHS) or the right-hand side (RHS) are true. (This is not an exclusive OR.) | ||
|- | | <code>`Button 1` | `Button 2`</code> | ||
The virtual controller button will be pressed if and only if Button 1 and/or Button 2 are pressed. | |||
|----------- | |||
! ''&'' | ! ''&'' | ||
| The expression is true if both the LHS and the RHS are true. | | The expression is true if both the LHS and the RHS are true. | ||
|- | | <code>`Button 1` & `Button 2`</code> | ||
The virtual controller button will be pressed if and only if both Button 1 and Button 2 are pressed. | |||
|----------- | |||
! ''!'' | ! ''!'' | ||
| Negates the following expression's value. | | Negates the following expression's value. | ||
|- | | <code>!`Button 1`</code> | ||
The virtual controller button will be pressed if and only if Button 1 is not pressed. | |||
|----------- | |||
! ''+'' | ! ''+'' | ||
| The expression value is equal to the LHS value and the RHS value summed up. | | The expression value is equal to the LHS value and the RHS value summed up. |