Skip to content

Commit

Permalink
Document if/unless return condition when no else
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jan 14, 2018
1 parent 31dcf0d commit d20574d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/ops.markdown
Expand Up @@ -1387,14 +1387,16 @@ Otherwise returns 1.
* `if(Block $condition, Block $then, Block $else)`

If the `$condition` evaluates to a non-zero value, run the `$then` block.
If not, and an `$else` block is present, run that instead.
If not, and an `$else` block is present, run that instead, if it's absent,
return result of `$condition`.

## unless
* `unless(Block $condition, Block $then)`
* `unless(Block $condition, Block $then, Block $else)`

If the `$condition` evaluates to 0, run the `$then` block.
If not, and an `$else` block is present, run that instead.
If not, and an `$else` block is present, run that instead, if it's absent,
return result of `$condition`.

# <a id="control"></a> Loop/Control Opcodes

Expand Down

0 comments on commit d20574d

Please sign in to comment.