aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-12-15 01:50:56 -0500
committerMarti Bolivar <mbolivar@mit.edu>2010-12-15 16:16:31 -0500
commitd744fb826f4a6d6ce560f3b78f2e63a1f9666d9e (patch)
tree35d0939c959cec372e1a6ce2f4bdf95dbe977918 /docs/source/lang/cpp
parent74c8937446e1be4e0d21f69a8c098e2caf7814d5 (diff)
downloadlibrambutan-d744fb826f4a6d6ce560f3b78f2e63a1f9666d9e.tar.gz
librambutan-d744fb826f4a6d6ce560f3b78f2e63a1f9666d9e.zip
Finalized 0.0.9 documentation.
Diffstat (limited to 'docs/source/lang/cpp')
-rw-r--r--docs/source/lang/cpp/built-in-types.rst (renamed from docs/source/lang/cpp/numeric-types.rst)34
-rw-r--r--docs/source/lang/cpp/keywords.rst2
-rw-r--r--docs/source/lang/cpp/variables.rst6
-rw-r--r--docs/source/lang/cpp/void.rst10
4 files changed, 35 insertions, 17 deletions
diff --git a/docs/source/lang/cpp/numeric-types.rst b/docs/source/lang/cpp/built-in-types.rst
index 9d2be48..1323db8 100644
--- a/docs/source/lang/cpp/numeric-types.rst
+++ b/docs/source/lang/cpp/built-in-types.rst
@@ -1,16 +1,20 @@
-.. _lang-numeric-types:
+.. highlight:: cpp
-Numeric types
-=============
+.. _lang-built-in-types:
-This document serves as a reference for all of the built-in numeric
-types which are available when programming in the IDE. Programmers
-using the :ref:`command-line tools <unix-toolchain>` will have access
-to these types as long as they have imported ``wirish.h``; several are
-defined in in `libmaple_types.h
+================
+ Built-in Types
+================
+
+This document serves as a reference for many of the built-in types
+which are available when programming in the IDE. Programmers using
+the :ref:`command-line tools <unix-toolchain>` will have access to
+these types as long as they have imported `wirish.h
+<https://github.com/leaflabs/libmaple/blob/master/wirish/wirish.h>`_;
+several are defined in in `libmaple_types.h
<https://github.com/leaflabs/libmaple/blob/master/libmaple/libmaple_types.h>`_.
-.. _lang-numeric-types-integral:
+.. _lang-built-in-types-integral:
Integral types
--------------
@@ -77,3 +81,15 @@ Floating-Point Types
.. cpp:type:: double
64-bit, IEEE 754 double-precision floating-point type.
+
+Other Types
+-----------
+
+.. cpp:type:: voidFuncPtr
+
+ Pointer to a function that takes no arguments and returns nothing, i.e.
+
+ ::
+
+ typedef void (*voidFuncPtr)(void);
+
diff --git a/docs/source/lang/cpp/keywords.rst b/docs/source/lang/cpp/keywords.rst
index e4ebe99..e3bc20d 100644
--- a/docs/source/lang/cpp/keywords.rst
+++ b/docs/source/lang/cpp/keywords.rst
@@ -94,7 +94,7 @@ The following keywords are used for built-in types.
- :ref:`lang-float`
- :ref:`lang-int`
- :ref:`lang-long`
-- :ref:`short <lang-numeric-types-integral>`
+- :ref:`short <lang-built-in-types-integral>`
- :ref:`void <lang-void>` (not really a type, but used in the absence
of one)
diff --git a/docs/source/lang/cpp/variables.rst b/docs/source/lang/cpp/variables.rst
index 9094cd5..e6da0c9 100644
--- a/docs/source/lang/cpp/variables.rst
+++ b/docs/source/lang/cpp/variables.rst
@@ -37,7 +37,7 @@ named ``inputVariable2``, with an initial value of ``0``::
int inputVariable2 = 0;
The Maple environment comes ready to use with many useful types of
-variables. See the :ref:`built-in types <lang-numeric-types>` page
+variables. See the :ref:`built-in types <lang-built-in-types>` page
for more information.
Here are a few examples of declaring variables of different types::
@@ -116,7 +116,7 @@ he goes past the left side of the screen, he reappears on the right::
x = x + 1; // x now contains -2,147,483,648; rolled over "right to left"
Each numeric type's reference page includes its range. See the
-:ref:`built-in types <lang-numeric-types>` reference for links to each
+:ref:`built-in types <lang-built-in-types>` reference for links to each
type's reference page.
Using Variables
@@ -149,7 +149,7 @@ See Also
--------
- :ref:`lang-scope`
-- :ref:`lang-numeric-types`
+- :ref:`lang-built-in-types`
.. rubric:: Footnotes
diff --git a/docs/source/lang/cpp/void.rst b/docs/source/lang/cpp/void.rst
index 88bd448..88c9c64 100644
--- a/docs/source/lang/cpp/void.rst
+++ b/docs/source/lang/cpp/void.rst
@@ -5,10 +5,12 @@
``void``
========
-The ``void`` keyword is used only in function declarations. It
-indicates that the function is expected to return no information to
-the function from which it was called, or that it expects no arguments
-from its caller.
+.. cpp:type:: void
+
+ The ``void`` keyword is used in function declarations. It indicates
+ that the function is expected to return no information to the
+ function from which it was called, or that it expects no arguments
+ from its caller.
Example
-------