diff options
Diffstat (limited to 'docs/types.rst')
-rw-r--r-- | docs/types.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst index 737fbe7d..988a0ed0 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -241,6 +241,8 @@ to and from all integer types but implicit conversion is not allowed. :: + pragma solidity ^0.4.0; + contract test { enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } ActionChoices choice; @@ -300,6 +302,8 @@ memory-stored reference type does not create a copy. :: + pragma solidity ^0.4.0; + contract C { uint[] x; // the data location of x is storage @@ -378,6 +382,8 @@ the ``.length`` member. :: + pragma solidity ^0.4.0; + contract C { function f(uint len) { uint[] memory a = new uint[](7); @@ -397,6 +403,8 @@ assigned to a variable right away. :: + pragma solidity ^0.4.0; + contract C { function f() { g([uint(1), 2, 3]); @@ -416,6 +424,8 @@ possible: :: + pragma solidity ^0.4.0; + contract C { function f() { // The next line creates a type error because uint[3] memory @@ -452,6 +462,8 @@ Members :: + pragma solidity ^0.4.0; + contract ArrayContract { uint[2**20] m_aLotOfIntegers; // Note that the following is not a pair of arrays but an array of pairs. @@ -521,6 +533,8 @@ shown in the following example: :: + pragma solidity ^0.4.0; + contract CrowdFunding { // Defines a new type with two fields. struct Funder { |