This commit is contained in:
minami 2021-12-05 16:58:03 +09:00
parent 907405e2e0
commit 6bafeca8a2

View File

@ -166,7 +166,7 @@ Inside a code block, the following elements can be used
- if statements, e.g. ``if lt(a, b) { sstore(0, 1) }`` - if statements, e.g. ``if lt(a, b) { sstore(0, 1) }``
- switch statements, e.g. ``switch mload(0) case 0 { revert() } default { mstore(0, 1) }`` - switch statements, e.g. ``switch mload(0) case 0 { revert() } default { mstore(0, 1) }``
- for loops, e.g. ``for { let i := 0} lt(i, 10) { i := add(i, 1) } { mstore(i, 7) }`` - for loops, e.g. ``for { let i := 0} lt(i, 10) { i := add(i, 1) } { mstore(i, 7) }``
- function definitions, e.g. ``function f(a, b) -> c { c := add(a, b) }``` - function definitions, e.g. ``function f(a, b) -> c { c := add(a, b) }``
Multiple syntactical elements can follow each other simply separated by Multiple syntactical elements can follow each other simply separated by
whitespace, i.e. there is no terminating ``;`` or newline required. whitespace, i.e. there is no terminating ``;`` or newline required.