pxt-calliope/docs/reference/logic.md
2016-04-13 08:27:45 -07:00

40 lines
415 B
Markdown

# Logic
[if](/reference/logic/if)
```blocks
if(true) {
}
```
[Boolean](/reference/types/boolean) values: *true*; *false*
```blocks
true
false
```
Boolean binary operators: *and* (conjunction); *or* (disjunction)
```blocks
true && false;
true || false;
```
Boolean negation operator
```blocks
!true
```
Comparison operators (=, !=, <, >, <=, >=)
```blocks
0 == 0;
1 !- 0;
0 < 1;
1 > 0;
0 <= 1;
1 >= 0;
```