diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-26 21:44:15 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-27 06:05:09 +0800 |
commit | bf10cd6c956362789047b4771071417908e9e206 (patch) | |
tree | 829da19a1d75358856d63173297b197cec63a93d /docs/units-and-global-variables.rst | |
parent | 04582dd2cbd2d0b843a3f2f1021204a95a523a71 (diff) | |
download | dexon-solidity-bf10cd6c956362789047b4771071417908e9e206.tar.gz dexon-solidity-bf10cd6c956362789047b4771071417908e9e206.tar.zst dexon-solidity-bf10cd6c956362789047b4771071417908e9e206.zip |
Mention all global aliases
Diffstat (limited to 'docs/units-and-global-variables.rst')
-rw-r--r-- | docs/units-and-global-variables.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst index 6ccc8407..7ca3adac 100644 --- a/docs/units-and-global-variables.rst +++ b/docs/units-and-global-variables.rst @@ -35,7 +35,9 @@ These suffixes cannot be applied to variables. If you want to interpret some input variable in e.g. days, you can do it in the following way:: function f(uint start, uint daysAfter) { - if (now >= start + daysAfter * 1 days) { ... } + if (now >= start + daysAfter * 1 days) { + // ... + } } Special Variables and Functions @@ -103,10 +105,10 @@ Mathematical and Cryptographic Functions compute ``(x * y) % k`` where the multiplication is performed with arbitrary precision and does not wrap around at ``2**256``. ``keccak256(...) returns (bytes32)``: compute the Ethereum-SHA-3 (Keccak-256) hash of the (tightly packed) arguments -``sha3(...) returns (bytes32)``: - alias to ``keccak256()`` ``sha256(...) returns (bytes32)``: compute the SHA-256 hash of the (tightly packed) arguments +``sha3(...) returns (bytes32)``: + alias to ``keccak256`` ``ripemd160(...) returns (bytes20)``: compute RIPEMD-160 hash of the (tightly packed) arguments ``ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address)``: @@ -172,5 +174,8 @@ Contract Related ``selfdestruct(address recipient)``: destroy the current contract, sending its funds to the given :ref:`address` +``suicide(address recipient``: + alias to ``selfdestruct`` + Furthermore, all functions of the current contract are callable directly including the current function. |