aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/common-patterns.rst14
-rw-r--r--docs/contracts.rst6
-rw-r--r--docs/solidity-by-example.rst4
3 files changed, 12 insertions, 12 deletions
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index 531a94ad..0894aae2 100644
--- a/docs/common-patterns.rst
+++ b/docs/common-patterns.rst
@@ -148,10 +148,10 @@ restrictions highly readable.
{
if (msg.sender != _account)
throw;
- // Do not forget the "_"! It will
+ // Do not forget the "_;"! It will
// be replaced by the actual function
// body when the modifier is invoked.
- _
+ _;
}
/// Make `_newOwner` the new owner of this
@@ -164,7 +164,7 @@ restrictions highly readable.
modifier onlyAfter(uint _time) {
if (now < _time) throw;
- _
+ _;
}
/// Erase ownership information.
@@ -187,7 +187,7 @@ restrictions highly readable.
modifier costs(uint _amount) {
if (msg.value < _amount)
throw;
- _
+ _;
if (msg.value > _amount)
msg.sender.send(msg.value - _amount);
}
@@ -286,7 +286,7 @@ function finishes.
modifier atStage(Stages _stage) {
if (stage != _stage) throw;
- _
+ _;
}
function nextStage() internal {
@@ -304,7 +304,7 @@ function finishes.
now >= creationTime + 12 days)
nextStage();
// The other stages transition by transaction
- _
+ _;
}
// Order of the modifiers matters here!
@@ -328,7 +328,7 @@ function finishes.
// automatically.
modifier transitionNext()
{
- _
+ _;
nextStage();
}
diff --git a/docs/contracts.rst b/docs/contracts.rst
index a22a3544..dfa79e79 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -321,7 +321,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
modifier onlyOwner {
if (msg.sender != owner)
throw;
- _
+ _;
}
}
@@ -341,7 +341,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
// Modifiers can receive arguments:
modifier costs(uint price) {
if (msg.value >= price) {
- _
+ _;
}
}
}
@@ -367,7 +367,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
modifier noReentrancy() {
if (locked) throw;
locked = true;
- _
+ _;
locked = false;
}
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index 8e23dafd..b8fa4a73 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -403,8 +403,8 @@ high or low invalid bids.
/// functions. `onlyBefore` is applied to `bid` below:
/// The new function body is the modifier's body where
/// `_` is replaced by the old function body.
- modifier onlyBefore(uint _time) { if (now >= _time) throw; _ }
- modifier onlyAfter(uint _time) { if (now <= _time) throw; _ }
+ modifier onlyBefore(uint _time) { if (now >= _time) throw; _; }
+ modifier onlyAfter(uint _time) { if (now <= _time) throw; _; }
function BlindAuction(
uint _biddingTime,