Revise "Result"

This commit is contained in:
flaviut 2014-06-01 15:15:19 -04:00
commit 1b7e23333e

View file

@ -3,7 +3,7 @@ title: Result
--- ---
# Result # Result
The `result` variable is a special variable that serves as an implicit return variable. This is useful because in most cases, the control flow semantics of the `return` statement are unneeded. `result` is initialized with the default value for a given return type, so the following code starts as `0`, before being initialized to `number`: The `result` variable is a special variable that serves as an implicit return variable, which exists because the control flow semantics of the `return` statement are rarely needed. The result variable is initialized in the standard way, as if it was declared with `var result: T`.
``` nimrod ``` nimrod
proc `**`(number, power: int): int = proc `**`(number, power: int): int =