aboutsummaryrefslogtreecommitdiffstats
path: root/docs/julia.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-09 22:58:31 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-09 23:04:11 +0800
commitf753dda337a669c9e072ea4874de3caf05cae1ab (patch)
treea39904bb3d7857197ebc10520bd97215f4bb5afd /docs/julia.rst
parentaf0d73f77df67fa2a284b27ebbdd147a2bad7c27 (diff)
downloaddexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.gz
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.bz2
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.lz
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.xz
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.zst
dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.zip
Describe rule for type conversion functions in Julia
Diffstat (limited to 'docs/julia.rst')
-rw-r--r--docs/julia.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/julia.rst b/docs/julia.rst
index 14e13cc4..bc918117 100644
--- a/docs/julia.rst
+++ b/docs/julia.rst
@@ -306,12 +306,15 @@ Type Conversion Functions
JULIA has no support for implicit type conversion and therefore functions exists to provide explicit conversion.
When converting a larger type to a shorter type a runtime exception can occur in case of an overflow.
-The following type conversion functions must be available:
- - ``u32tobool(x:u32) -> y:bool``
- - ``booltou32(x:bool) -> y:u32``
- - ``u32tou64(x:u32) -> y:u64``
- - ``u64tou32(x:u64) -> y:u32``
- - etc. (TBD)
+Truncating conversions are supported between the following types:
+ - ``bool``
+ - ``u32``
+ - ``u64``
+ - ``u256``
+ - ``s256``
+
+For each of these a type conversion function exists having the prototype in the form of ``<input_type>to<output_type>(x:<input_type>) -> y:<output_type>``,
+such as ``u32tobool(x:u32) -> y:bool``, ``u256tou32(x:u256) -> y:u32`` or ``s256tou256(x:s256) -> y:u256``.
.. note::