From 95c4f8f2bd0ed677d6a3aa705573d4e376da98e1 Mon Sep 17 00:00:00 2001 From: asymmetric Date: Tue, 30 Apr 2019 14:46:43 +0000 Subject: [PATCH] Conversion: remove confusing int8 type The topic of converting a smaller type into a larger one is orthogonal to the one discussed in the example (namely, conversion between signed and unsigned integers). Therefore, we change the `int8` to an `int` to make the example clearer. --- docs/types/conversion.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/types/conversion.rst b/docs/types/conversion.rst index 5a9f84c00..49a3f0100 100644 --- a/docs/types/conversion.rst +++ b/docs/types/conversion.rst @@ -26,11 +26,11 @@ doing, an explicit type conversion is sometimes possible. Note that this may give you some unexpected behaviour and allows you to bypass some security features of the compiler, so be sure to test that the result is what you want! Take the following example where you are converting -a negative ``int8`` to a ``uint``: +a negative ``int`` to a ``uint``: :: - int8 y = -3; + int y = -3; uint x = uint(y); At the end of this code snippet, ``x`` will have the value ``0xfffff..fd`` (64 hex