mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #13292 from The-Arbiter/Function_modifiers_placeholder
Placeholder elaboration in function-modifiers.rst
This commit is contained in:
commit
3658d8abc4
@ -111,6 +111,12 @@ whitespace-separated list and are evaluated in the order presented.
|
|||||||
Modifiers cannot implicitly access or change the arguments and return values of functions they modify.
|
Modifiers cannot implicitly access or change the arguments and return values of functions they modify.
|
||||||
Their values can only be passed to them explicitly at the point of invocation.
|
Their values can only be passed to them explicitly at the point of invocation.
|
||||||
|
|
||||||
|
In function modifiers, it is necessary to specify when you want the function to which the modifier is
|
||||||
|
applied to be run. The placeholder statement (denoted by a single underscore character ``_``) is used to
|
||||||
|
denote where the body of the function being modified should be inserted. Note that the
|
||||||
|
placeholder operator is different from using underscores as leading or trailing characters in variable
|
||||||
|
names, which is a stylistic choice.
|
||||||
|
|
||||||
Explicit returns from a modifier or function body only leave the current
|
Explicit returns from a modifier or function body only leave the current
|
||||||
modifier or function body. Return variables are assigned and
|
modifier or function body. Return variables are assigned and
|
||||||
control flow continues after the ``_`` in the preceding modifier.
|
control flow continues after the ``_`` in the preceding modifier.
|
||||||
|
Loading…
Reference in New Issue
Block a user