aboutsummaryrefslogtreecommitdiffstats
path: root/docs/control-structures.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-03-16 07:50:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-03-16 20:37:18 +0800
commit6ece0d6c2f689de2dc82a31cea8625f168346b44 (patch)
tree7b8b33a9737cbfc6bd530581a68300045a908968 /docs/control-structures.rst
parente34a9600f27f7b48fb2473db6bc45377190301b0 (diff)
downloaddexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar.gz
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar.bz2
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar.lz
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar.xz
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.tar.zst
dexon-solidity-6ece0d6c2f689de2dc82a31cea8625f168346b44.zip
Document the .value() and .gas() modifiers
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r--docs/control-structures.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index a3af41dd..b1e16644 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -113,8 +113,8 @@ actual contract has not been created yet.
Functions of other contracts have to be called externally. For an external call,
all function arguments have to be copied to memory.
-When calling functions
-of other contracts, the amount of Wei sent with the call and the gas can be specified::
+When calling functions of other contracts, the amount of Wei sent with the call and
+the gas can be specified with special options ``.value()`` and ``.gas()``, respectively::
contract InfoFeed {
function info() payable returns (uint ret) { return 42; }
@@ -235,7 +235,7 @@ creation-dependencies are not possible.
}
}
-As seen in the example, it is possible to forward Ether to the creation,
+As seen in the example, it is possible to forward Ether to the creation using the ``.value()`` option,
but it is not possible to limit the amount of gas. If the creation fails
(due to out-of-stack, not enough balance or other problems), an exception
is thrown.