summaryrefslogtreecommitdiffhomepage
path: root/solidity.html.markdown
diff options
context:
space:
mode:
authorAl <80943867+al-ias@users.noreply.github.com>2022-07-24 21:18:37 +0200
committerGitHub <noreply@github.com>2022-07-24 21:18:37 +0200
commit814f3dbc9867c1062cb10ae6da8aa9061b288324 (patch)
tree3e5e9f57791b435f2781ddbea7ee4d35d6a50e1f /solidity.html.markdown
parent2949bf690a32ae47b507c8551d8c347e7dad4c70 (diff)
parent40e69760e93322603cf1780f9f54793a5aefaaa3 (diff)
Merge pull request #4 from al-ias/could-be-fix/solidity
Could be fix/solidity
Diffstat (limited to 'solidity.html.markdown')
-rw-r--r--solidity.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/solidity.html.markdown b/solidity.html.markdown
index fd076532..4dfb0adc 100644
--- a/solidity.html.markdown
+++ b/solidity.html.markdown
@@ -278,7 +278,7 @@ f(22); // call
// Delete can be called on most types
// (does NOT destroy value, but sets value to 0, the initial value)
-uint x = 5;
+delete x;
// Destructuring/Tuples
@@ -435,7 +435,7 @@ function increment(uint x) view returns (uint x) {
// Functions hoisted - and can assign a function to a variable
function a() {
var z = b;
- b();
+ z();
}
function b() {
@@ -494,7 +494,7 @@ Coin.LogSent().watch({}, '', function(error, result) {
// '_' (underscore) often included as last line in body, and indicates
// function being called should be placed there
modifier onlyAfter(uint _time) { require (now >= _time); _; }
-modifier onlyOwner { require(msg.sender == owner) _; }
+modifier onlyOwner { require(msg.sender == owner); _; }
// commonly used with state machines
modifier onlyIfStateA (State currState) { require(currState == State.A) _; }