aboutsummaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-04-12 01:07:59 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-04-12 17:25:51 -0400
commitc99caea9992116cccf2d145a96a3ec189ef1068f (patch)
treec7dc05153a7d9663163889c142927e51e4b648c0 /source
parenta338622730388e440f30a1cacd58319be13b4e68 (diff)
downloadlibrambutan-c99caea9992116cccf2d145a96a3ec189ef1068f.tar.gz
librambutan-c99caea9992116cccf2d145a96a3ec189ef1068f.zip
Reverting "Rewrote Print class."
This reverts commit 8bd3cebbee62e2dd7e961b149cc8bb0e980eaf88.
Diffstat (limited to 'source')
-rw-r--r--source/lang/api/serial.rst35
-rw-r--r--source/lang/api/serialusb.rst35
2 files changed, 22 insertions, 48 deletions
diff --git a/source/lang/api/serial.rst b/source/lang/api/serial.rst
index 29c70a2..fadac34 100644
--- a/source/lang/api/serial.rst
+++ b/source/lang/api/serial.rst
@@ -116,34 +116,25 @@ means that you can use any of these functions on any of ``Serial1``,
Print the argument's digits over the USART, in decimal format.
-.. cpp:function:: HardwareSerial::print(long long n)
+.. cpp:function:: HardwareSerial::print(long n)
Print the argument's digits over the USART, in decimal format.
Negative values will be prefixed with a ``'-'`` character.
-.. cpp:function:: HardwareSerial::print(unsigned long long n)
+.. cpp:function:: HardwareSerial::print(unsigned long n)
Print the argument's digits over the USART, in decimal format.
-.. _lang-serial-print-n-base:
+.. cpp:function:: HardwareSerial::print(long n, int base)
-.. cpp:function:: HardwareSerial::print(int n, int base)
-
- Print the digits of ``n`` over the USART, in base ``base``. The
- ``base`` value 2 corresponds to binary, 8 to octal, 10 to decimal,
- and 16 to hexadecimal (you can also use the symbolic constants
- ``BIN``, ``OCT``, ``DEC``, ``HEX``). If ``base`` is 10, negative
- values will be prefixed with a ``'-'`` character (otherwise, ``n``
- will be interpreted as an unsigned quantity).
-
-.. cpp:function:: HardwareSerial::print(long long n, int base)
-
- Same behavior as the above :ref:`print(int n, int base)
- <lang-serial-print-n-base>`, except with 64-bit values.
+ Print the digits of ``n`` over the USART, in base ``base`` (which
+ may be between 2 and 16). The ``base`` value 2 corresponds to
+ binary, 8 to octal, 10 to decimal, and 16 to hexadecimal. Negative
+ values will be prefixed with a ``'-'`` character.
.. cpp:function:: HardwareSerial::print(double n)
- Print ``n``, accurate to 6 digits after the decimal point.
+ Print ``n``, accurate to 2 digits after the decimal point.
.. _lang-serial-println:
@@ -167,19 +158,15 @@ means that you can use any of these functions on any of ``Serial1``,
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: HardwareSerial::println(long long n)
+.. cpp:function:: HardwareSerial::println(long n)
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: HardwareSerial::println(unsigned long long n)
+.. cpp:function:: HardwareSerial::println(unsigned long n)
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: HardwareSerial::println(int n, int base)
-
- Like ``print(n, b)``, followed by ``"\r\n"``.
-
-.. cpp:function:: HardwareSerial::println(long long n, int base)
+.. cpp:function:: HardwareSerial::println(long n, int base)
Like ``print(n, b)``, followed by ``"\r\n"``.
diff --git a/source/lang/api/serialusb.rst b/source/lang/api/serialusb.rst
index 4ddfa4a..ee7146e 100644
--- a/source/lang/api/serialusb.rst
+++ b/source/lang/api/serialusb.rst
@@ -109,35 +109,26 @@ world!")``.
Print the argument's digits over the USB connection, in decimal format.
-.. cpp:function:: USBSerial::print(long long n)
+.. cpp:function:: USBSerial::print(long n)
Print the argument's digits over the USB connection, in decimal
format. Negative values will be prefixed with a ``'-'`` character.
-.. cpp:function:: USBSerial::print(unsigned long long n)
+.. cpp:function:: USBSerial::print(unsigned long n)
Print the argument's digits over the USB connection, in decimal
format.
-.. _lang-serial-print-n-base:
+.. cpp:function:: USBSerial::print(long n, int base)
-.. cpp:function:: USBSerial::print(int n, int base)
-
- Print the digits of ``n`` over USB, in base ``base``. The ``base``
- value 2 corresponds to binary, 8 to octal, 10 to decimal, and 16 to
- hexadecimal (you can also use the symbolic constants ``BIN``,
- ``OCT``, ``DEC``, ``HEX``). If ``base`` is 10, negative values
- will be prefixed with a ``'-'`` character (otherwise, ``n`` will be
- interpreted as an unsigned quantity).
-
-.. cpp:function:: HardwareSerial::print(long long n, int base)
-
- Same behavior as the above :ref:`print(int n, int base)
- <lang-serialusb-print-n-base>`, except with 64-bit values.
+ Print the digits of ``n`` over the USB connection, in base ``base``
+ (which may be between 2 and 16). The ``base`` value 2 corresponds
+ to binary, 8 to octal, 10 to decimal, and 16 to hexadecimal.
+ Negative values will be prefixed with a ``'-'`` character.
.. cpp:function:: USBSerial::print(double n)
- Print ``n``, accurate to 6 digits after the decimal point.
+ Print ``n``, accurate to 2 digits after the decimal point.
.. _lang-serialusb-println:
@@ -161,19 +152,15 @@ world!")``.
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: USBSerial::println(long long n)
+.. cpp:function:: USBSerial::println(long n)
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: USBSerial::println(unsigned long long n)
+.. cpp:function:: USBSerial::println(unsigned long n)
Like ``print(n)``, followed by ``"\r\n"``.
-.. cpp:function:: USBSerial::println(int n, int base)
-
- Like ``print(n, b)``, followed by ``"\r\n"``.
-
-.. cpp:function:: USBSerial::println(long long n, int base)
+.. cpp:function:: USBSerial::println(long n, int base)
Like ``print(n, b)``, followed by ``"\r\n"``.