diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-09 22:58:31 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-09 23:04:11 +0800 |
commit | f753dda337a669c9e072ea4874de3caf05cae1ab (patch) | |
tree | a39904bb3d7857197ebc10520bd97215f4bb5afd | |
parent | af0d73f77df67fa2a284b27ebbdd147a2bad7c27 (diff) | |
download | dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.gz dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.tar.zst dexon-solidity-f753dda337a669c9e072ea4874de3caf05cae1ab.zip |
Describe rule for type conversion functions in Julia
-rw-r--r-- | docs/julia.rst | 15 |
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:: |