Skip to content

Commit

Permalink
Add basic docs for while (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro authored and chenglou committed Mar 20, 2017
1 parent 33279d5 commit 39bb6cb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,25 @@
#### While Loops
While loops are also fully imperative constructs. They execute a code block while
some condition is true. The form of a `while` loop includes a single expression,
the condition to test.
```reason
while testCondition {
statements;
};
```
The parenthesis around `testCondition` may be omitted if they are unnecessary,
such as in the following example.
```reason
while true {
print_newline ();
};
```
Type Parameters
----------
Some types are very specific, such as `int`, or `string`, but other types
Expand Down

0 comments on commit 39bb6cb

Please sign in to comment.