Skip to content

Commit 6e1d3b6

Browse files
authored
Function modifiers separated by spaces
Unless I misunderstood something, function modifiers are separated by spaces, and not commas?
1 parent 05f0dfe commit 6e1d3b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

07smart-contracts-solidity.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ This function modifier, named +onlyOwner+, sets a condition on any function that
492492

493493
You may have noticed that our function modifier has a peculiar syntactic "placeholder" in it, an underscore followed by a semicolon (+_;+). This placeholder is replaced by the code of the function that is being modified. Essentially, the modifier is "wrapped around" the modified function, placing its code in the location identified by the underscore character.
494494

495-
To apply a modifier, you add its name to the function declaration. More than one modifier can be applied to a function; they are applied in the sequence they are declared, as a comma-separated list.
495+
To apply a modifier, you add its name to the function declaration. More than one modifier can be applied to a function; they are applied in the sequence they are declared, as a space-separated list.
496496

497497
Let's rewrite our +destroy+ function to use the +onlyOwner+ modifier:
498498

0 commit comments

Comments
 (0)