Use msg.value and gasleft() as an example in the docs.

This commit is contained in:
Daniel Kirchner 2018-03-05 16:59:33 +01:00
parent 29fb5fe1c9
commit b8589fbe0f

View File

@ -402,7 +402,7 @@ State variables can be declared as ``constant``. In this case, they have to be
assigned from an expression which is a constant at compile time. Any expression
that accesses storage, blockchain data (e.g. ``now``, ``this.balance`` or
``block.number``) or
execution data (``msg.value``) or make calls to external contracts are disallowed. Expressions
execution data (``msg.value`` or ``gasleft()``) or make calls to external contracts are disallowed. Expressions
that might have a side-effect on memory allocation are allowed, but those that
might have a side-effect on other memory objects are not. The built-in functions
``keccak256``, ``sha256``, ``ripemd160``, ``ecrecover``, ``addmod`` and ``mulmod``