diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-27 22:08:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-11 00:30:57 +0800 |
commit | 34503d98d7d95fc3a55a60be854809524c1f204e (patch) | |
tree | 4af026d976579548d3370e0bf6479c7aa32f24cb | |
parent | a323486a9bf40d60eb1a7914aaf38bb412c74ea0 (diff) | |
download | dexon-solidity-34503d98d7d95fc3a55a60be854809524c1f204e.tar.gz dexon-solidity-34503d98d7d95fc3a55a60be854809524c1f204e.tar.zst dexon-solidity-34503d98d7d95fc3a55a60be854809524c1f204e.zip |
Move init/cond into the for loop
-rw-r--r-- | docs/assembly.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst index 5288089f..377a6530 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -106,13 +106,13 @@ you really know what you are doing. // Skip over the length field. _data := add(_data, 0x20) - // Set up a bound. - let end := add(_data, len) - // Iterate until the bound is not met. - for {} lt(_data, end) {} { + for + { let end := add(_data, len) } + lt(_data, end) + { _data := add(_data, 0x20) } + { o_sum := add(o_sum, mload(_data)) - _data := add(_data, 0x20) } // NOTE: after this point it is not safe to use _data in Solidity code |