mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update documentation.
This commit is contained in:
parent
3984beef7d
commit
f7153ee58a
@ -473,7 +473,7 @@ The following statements are considered modifying the state:
|
|||||||
}
|
}
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
``constant`` on functions is an alias to ``view``, but this is deprecated and will be dropped in version 0.5.0.
|
``constant`` on functions used to be an alias to ``view``, but this was dropped in version 0.5.0.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Getter methods are marked ``view``.
|
Getter methods are marked ``view``.
|
||||||
|
@ -58,7 +58,7 @@ ArrayTypeName = TypeName '[' Expression? ']'
|
|||||||
FunctionTypeName = 'function' FunctionTypeParameterList ( 'internal' | 'external' | StateMutability )*
|
FunctionTypeName = 'function' FunctionTypeParameterList ( 'internal' | 'external' | StateMutability )*
|
||||||
( 'returns' FunctionTypeParameterList )?
|
( 'returns' FunctionTypeParameterList )?
|
||||||
StorageLocation = 'memory' | 'storage' | 'calldata'
|
StorageLocation = 'memory' | 'storage' | 'calldata'
|
||||||
StateMutability = 'pure' | 'constant' | 'view' | 'payable'
|
StateMutability = 'pure' | 'view' | 'payable'
|
||||||
|
|
||||||
Block = '{' Statement* '}'
|
Block = '{' Statement* '}'
|
||||||
Statement = IfStatement | WhileStatement | ForStatement | Block | InlineAssemblyStatement |
|
Statement = IfStatement | WhileStatement | ForStatement | Block | InlineAssemblyStatement |
|
||||||
|
@ -401,7 +401,6 @@ Modifiers
|
|||||||
- ``view`` for functions: Disallows modification of state - this is not enforced yet.
|
- ``view`` for functions: Disallows modification of state - this is not enforced yet.
|
||||||
- ``payable`` for functions: Allows them to receive Ether together with a call.
|
- ``payable`` for functions: Allows them to receive Ether together with a call.
|
||||||
- ``constant`` for state variables: Disallows assignment (except initialisation), does not occupy storage slot.
|
- ``constant`` for state variables: Disallows assignment (except initialisation), does not occupy storage slot.
|
||||||
- ``constant`` for functions: Same as ``view``.
|
|
||||||
- ``anonymous`` for events: Does not store event signature as topic.
|
- ``anonymous`` for events: Does not store event signature as topic.
|
||||||
- ``indexed`` for event parameters: Stores the parameter as topic.
|
- ``indexed`` for event parameters: Stores the parameter as topic.
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ be passed via and returned from external function calls.
|
|||||||
|
|
||||||
Function types are notated as follows::
|
Function types are notated as follows::
|
||||||
|
|
||||||
function (<parameter types>) {internal|external} [pure|constant|view|payable] [returns (<return types>)]
|
function (<parameter types>) {internal|external} [pure|view|payable] [returns (<return types>)]
|
||||||
|
|
||||||
In contrast to the parameter types, the return types cannot be empty - if the
|
In contrast to the parameter types, the return types cannot be empty - if the
|
||||||
function type should not return anything, the whole ``returns (<return types>)``
|
function type should not return anything, the whole ``returns (<return types>)``
|
||||||
|
Loading…
Reference in New Issue
Block a user