diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-30 04:38:41 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-04 22:57:05 +0800 |
commit | 76bd8c57694b9335dc5ce29204f57825b4a565eb (patch) | |
tree | 86cc486dd1d5d77ccdefa5b75777ff9c0d8e35a3 /docs | |
parent | c975bf87db9e41014af70d74dd48514b5783c30f (diff) | |
download | dexon-solidity-76bd8c57694b9335dc5ce29204f57825b4a565eb.tar.gz dexon-solidity-76bd8c57694b9335dc5ce29204f57825b4a565eb.tar.zst dexon-solidity-76bd8c57694b9335dc5ce29204f57825b4a565eb.zip |
Explain fixed point types
Diffstat (limited to 'docs')
-rw-r--r-- | docs/types.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst index b8d387b2..d1b5a3f1 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -79,6 +79,15 @@ Fixed Point Numbers Fixed point numbers are not fully supported by Solidity yet. They can be declared, but cannot be assigned to or from. +``fixed`` / ``ufixed``: Signed and unsigned fixed point number of various sizes. Keywords ``ufixedMxN`` and ``fixedMxN``, where ``M`` represent the number of bits taken by +the type and ``N`` represent how many decimal points are available. ``M`` must be divisible by 8 and goes from 8 to 256 bits. ``N`` must be between 0 and 80, inclusive. +``ufixed`` and ``fixed`` are aliases for ``ufixed128x19`` and ``fixed128x19``, respectively. + +Operators: + +* Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>`` (evaluate to ``bool``) +* Arithmetic operators: ``+``, ``-``, unary ``-``, unary ``+``, ``*``, ``/``, ``%`` (remainder) + .. index:: address, balance, send, call, callcode, delegatecall, transfer .. _address: |