diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-24 20:46:23 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-26 02:03:25 +0800 |
commit | 3ca00c73f9bac055f44bb5e3e27fdcb7ced0ee5c (patch) | |
tree | 6679b9e4363b7df17df5136a0830ef4a105bd4b6 /docs/control-structures.rst | |
parent | c9f468b7172157752df64c4ff3d7bfab01650a65 (diff) | |
download | dexon-solidity-3ca00c73f9bac055f44bb5e3e27fdcb7ced0ee5c.tar.gz dexon-solidity-3ca00c73f9bac055f44bb5e3e27fdcb7ced0ee5c.tar.zst dexon-solidity-3ca00c73f9bac055f44bb5e3e27fdcb7ced0ee5c.zip |
Update version pragma in all documentation examples
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r-- | docs/control-structures.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst index ae0abc49..e710eb6d 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -20,7 +20,7 @@ For example, suppose we want our contract to accept one kind of external calls with two integers, we would write something like:: - pragma solidity ^0.4.16; + pragma solidity >=0.4.16 <0.6.0; contract Simple { uint sum; @@ -40,7 +40,7 @@ The output parameters can be declared with the same syntax after the the sum and the product of the two given integers, then we would write:: - pragma solidity ^0.4.16; + pragma solidity >=0.4.16 <0.6.0; contract Simple { function arithmetic(uint _a, uint _b) @@ -99,7 +99,7 @@ Internal Function Calls Functions of the current contract can be called directly ("internally"), also recursively, as seen in this nonsensical example:: - pragma solidity ^0.4.16; + pragma solidity >=0.4.16 <0.6.0; contract C { function g(uint a) public pure returns (uint ret) { return a + f(); } @@ -129,7 +129,7 @@ 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 with special options ``.value()`` and ``.gas()``, respectively:: - pragma solidity ^0.4.0; + pragma solidity >=0.4.0 <0.6.0; contract InfoFeed { function info() public payable returns (uint ret) { return 42; } @@ -176,7 +176,7 @@ parameters from the function declaration, but can be in arbitrary order. :: - pragma solidity ^0.4.0; + pragma solidity >=0.4.0 <0.6.0; contract C { mapping(uint => uint) data; @@ -199,7 +199,7 @@ Those parameters will still be present on the stack, but they are inaccessible. :: - pragma solidity ^0.4.16; + pragma solidity >=0.4.16 <0.6.0; contract C { // omitted name for parameter |