aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/arduino/longcast.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/arduino/longcast.rst')
-rw-r--r--docs/source/arduino/longcast.rst40
1 files changed, 13 insertions, 27 deletions
diff --git a/docs/source/arduino/longcast.rst b/docs/source/arduino/longcast.rst
index 9f31443..ed23821 100644
--- a/docs/source/arduino/longcast.rst
+++ b/docs/source/arduino/longcast.rst
@@ -1,3 +1,5 @@
+.. highlight:: cpp
+
.. _arduino-longcast:
long()
@@ -6,36 +8,20 @@ long()
Description
-----------
-Converts a value to the
-`long <http://arduino.cc/en/Reference/Long>`_ data type.
-
-
-
-Syntax
-------
-
-long(x)
-
-
-
-Parameters
-----------
+Converts a value to the :ref:`long <arduino-long>` data type. Here is
+an example::
-x: a value of any type
+ double d = 2.5;
+ long i = long(d); // i holds "2L", an long value
+The value inside of the parentheses (``long(...)``) can be of any type.
+However, if it is not a numeric type (like ``double``, ``char``,
+etc.), you will get strange results.
+See the :ref:`long <arduino-long>` reference for details about the
+precision and limitations of ``long`` variables on the Maple.
-Returns
--------
-
-long
-
-
-
-See also
+See Also
--------
-
-- `long <http://arduino.cc/en/Reference/Long>`_
-
-
+- :ref:`long <arduino-long>`