aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-07 19:27:29 +0800
committerGitHub <noreply@github.com>2019-01-07 19:27:29 +0800
commit4fa2a6865d0f3f4804384a964cf492e92a697ab4 (patch)
tree36c714632e79ad2807b1f3f1f08542319b8dab5c /docs
parent96d220163d6f35aa5ab218f6b6a5afcc46977dad (diff)
parent444464f8cfd54bb03d608941e8f50c593997f106 (diff)
downloaddexon-solidity-4fa2a6865d0f3f4804384a964cf492e92a697ab4.tar.gz
dexon-solidity-4fa2a6865d0f3f4804384a964cf492e92a697ab4.tar.zst
dexon-solidity-4fa2a6865d0f3f4804384a964cf492e92a697ab4.zip
Merge pull request #5720 from ethereum/docs_type_conversion
[DOCS] Fix examples in type conversion docs
Diffstat (limited to 'docs')
-rw-r--r--docs/types.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 08fbd7b3..4eb1f926 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -1289,7 +1289,7 @@ cut off::
uint16 b = uint16(a); // b will be 0x5678 now
If an integer is explicitly converted to a larger type, it is padded on the left (i.e. at the higher order end).
-The result of the conversion will compare equal to the original integer.
+The result of the conversion will compare equal to the original integer::
uint16 a = 0x1234;
uint32 b = uint32(a); // b will be 0x00001234 now
@@ -1321,7 +1321,7 @@ rules explicit::
uint32 b = uint16(a); // b will be 0x00001234
uint32 c = uint32(bytes4(a)); // c will be 0x12340000
uint8 d = uint8(uint16(a)); // d will be 0x34
- uint8 e = uint8(bytes1(a)); // d will be 0x12
+ uint8 e = uint8(bytes1(a)); // e will be 0x12
.. _types-conversion-literals: