mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-22 06:11:31 +03:00
39 lines
644 B
Markdown
39 lines
644 B
Markdown
|
<div class="short">
|
||
|
|
||
|
`wut ? %wut`
|
||
|
============
|
||
|
|
||
|
Conditionals
|
||
|
------------
|
||
|
|
||
|
The `?` runes, with the exception of `?=`, produce conditional
|
||
|
statements. The `?` runes are the workhorse of control-flow.
|
||
|
|
||
|
There are three basic categories.
|
||
|
|
||
|
</div>
|
||
|
|
||
|
#### If-then-else
|
||
|
|
||
|
[`?:`]() A natural `?` rune. The traditional if-than-else statement.
|
||
|
|
||
|
[`?.`]() Inversion of `?:`. An "unless" statement. Used to keep the code
|
||
|
flowing vertically.
|
||
|
|
||
|
<hr></hr>
|
||
|
|
||
|
#### Switches
|
||
|
|
||
|
[`?-`]() Tradional switch.
|
||
|
|
||
|
[`?+`]() Switch with a default return value.
|
||
|
|
||
|
<hr></hr>
|
||
|
|
||
|
#### Type Tests
|
||
|
|
||
|
[`?=`]() Tests if the [icon]() of [`++tile`]() `p` contains `q`.
|
||
|
|
||
|
<hr></hr>
|
||
|
|
||
|
<kids></kids>
|