From 5e587be27a7c3bd854b686952a5c9637a2432ff0 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Sun, 28 Nov 2010 11:23:33 -0500 Subject: reorganized all the arduino/ docs into a lang/ subdirectory since they're properly CC attributed now. --- docs/source/language.rst | 320 +++++++++++++++++++++++------------------------ 1 file changed, 160 insertions(+), 160 deletions(-) (limited to 'docs/source/language.rst') diff --git a/docs/source/language.rst b/docs/source/language.rst index bbdbf90..0a79fb0 100644 --- a/docs/source/language.rst +++ b/docs/source/language.rst @@ -42,174 +42,174 @@ Unique Maple Additions #define DEBUG_LEVEL DEBUG_NONE - before including either wirish or libmaple. In this case, all + before including either wirish.h or libmaple.h. In this case, all assertions will pass without any lost clock cycles. Note that this will **not work in the IDE**; even with this definition, assertions will still be enabled. -.. _language-arduino-docs: +.. _language-lang-docs: Maple Language Reference ------------------------ -+-------------------------------------------------+----------------------------------------------+---------------------------------------------------+ -| Structure | Variables | Functions | -| | | | -+=================================================+==============================================+===================================================+ -|* :ref:`setup() ` |**Constants** |**Digital I/O** | -| | | | -|* :ref:`loop() ` |* :ref:`HIGH ` | |* :ref:`pinMode() ` | -| | :ref:`LOW ` | | -| | |* :ref:`digitalWrite() ` | -|**Control Structures** |* :ref:`INPUT ` | | | -| | :ref:`OUTPUT ` |* :ref:`digitalRead() ` | -|* :ref:`if ` | | | -| |* :ref:`true ` | | | -|* :ref:`if...else ` | :ref:`false ` |**Analog I/O** | -| | | | -|* :ref:`for ` |* :ref:`integer constants |* :ref:`analogRead() ` | -| | ` | | -|* :ref:`switch/case ` | |* :ref:`pwmWrite() ` | -| |* :ref:`floating point constants | (:ref:`analogWrite() ` is | -|* :ref:`while ` | ` | also available, though its use is discouraged) | -| | | | -|* :ref:`do...while ` | | | -| |**Data Types** |**Advanced I/O** | -|* :ref:`break ` | | | -| | The size of each datatype, in bytes, is |* tone(): TODO | -|* :ref:`continue ` | given in parentheses where appropriate. | | -| | |* noTone(): TODO | -|* :ref:`return ` | *Note*: The ``word`` type is (deliberately) | | -| | :ref:`not supported `. |* shiftOut(): TODO | -|* :ref:`goto ` | | | -| |* :ref:`void ` |* pulseIn(): TODO | -| | | | -|**Further syntax** |* :ref:`boolean ` (1 byte) | | -| | |**Time** | -|* :ref:`; ` (semicolon) |* :ref:`char ` (1 byte) | | -| | |* :ref:`millis() ` | -|* :ref:`{} ` (curly braces) |* :ref:`unsigned char | | -| | ` (1 byte) |* :ref:`micros() ` | -|* :ref:`// ` | | | -| (single line comment) |* :ref:`byte ` (1 byte) |* :ref:`delay() ` | -| | | | -|* :ref:`/\* \*/ |* :ref:`int ` (4 bytes) |* :ref:`delayMicroseconds() | -| ` | | ` | -| (multi-line comment) |* :ref:`unsigned int ` | | -| | (4 bytes) | | -|* :ref:`#define ` | |**Math** | -| |* :ref:`long ` (8 bytes) | | -|* :ref:`#include ` | |* :ref:`min() ` | -| |* :ref:`unsigned long ` | | -| | (8 bytes) |* :ref:`max() ` | -|**Arithmetic Operators** | | | -| |* :ref:`float ` (4 bytes) |* :ref:`abs() ` | -|* :ref:`= ` | | | -| (assignment operator) |* :ref:`double ` (8 bytes) |* :ref:`constrain() ` | -| | | | -|* :ref:`+ ` (addition) |* :ref:`string ` |* :ref:`map() ` | -| | | | -|* :ref:`- ` |* :ref:`array ` |* :ref:`pow() ` | -| (subtraction) | | | -| |* Also provided: ``int8``, ``int16``, |* :ref:`sqrt() ` | -|* :ref:`* ` | ``int32``, ``int64``, and their unsigned | | -| (multiplication) | counterparts ``uint8``, ``uint16``, | | -| | ``uint32``, ``uint64``. |**Trigonometry** | -|* :ref:`/ ` (division) | | | -| | |* :ref:`sin() ` | -|* :ref:`% ` (modulo) |**Conversion** | | -| | |* :ref:`cos() ` | -| |* :ref:`char() ` | | -|**Comparison Operators** | |* :ref:`tan() ` | -| |* :ref:`byte() ` | | -|* :ref:`== ` (equal to) | | | -| |* :ref:`int() ` |**Random Numbers** | -|* :ref:`\!= ` | | | -| (not equal to) |* :ref:`long() ` |* :ref:`randomSeed() ` | -| | | | -|* :ref:`< ` (less than) |* :ref:`float() ` |* :ref:`random() ` | -| | | | -|* :ref:`> ` |* :ref:`double() ` | | -| (greater than) | |**Bits and Bytes** | -| | | | -|* :ref:`<= ` |**Variable Scope & Qualifiers** |* :ref:`lowByte() ` | -| (less than or equal to) | | | -| |* :ref:`variables `, |* :ref:`highByte() ` is | -|* :ref:`>= ` | :ref:`scope ` | provided, though its use is discouraged. | -| (greater than or equal to) | | | -| |* :ref:`static ` |* :ref:`bitRead() ` | -| | | | -|**Boolean Operators** |* :ref:`volatile ` |* :ref:`bitWrite() ` | -| | | | -|* :ref:`&& ` (and) |* :ref:`const ` |* :ref:`bitSet() ` | -| | | | -|* :ref:`|| ` (or) | |* :ref:`bitClear() ` | -| |**Utilities** | | -|* :ref:`\! ` (not) | |* :ref:`bit() ` | -| |* :ref:`sizeof() ` | | -| | (``sizeof`` operator) | | -|**Pointer Access Operators** | |**External Interrupts** | -| | | | -|* :ref:`* dereference operator | |* :ref:`Reference Page ` | -| ` | | | -| | |* :ref:`attachInterrupt() | -|* :ref:`& reference operator | | ` | -| ` | | | -| | |* :ref:`detachInterrupt() | -| | | ` | -|**Bitwise Operators** | | | -| | | | -|* :ref:`& ` | |**Interrupts** | -| (bitwise and) | | | -| | |* interrupts(): TODO | -|* :ref:`| ` | | | -| (bitwise or) | |* noInterrupts(): TODO | -| | | | -|* :ref:`^ ` | | | -| (bitwise xor) | |**Communication** | -| | | | -|* :ref:`~ ` | |* :ref:`SerialUSB ` | -| (bitwise not) | | | -| | |* :ref:`Serial ` | -|* :ref:`\<\< ` | | | -| (shift left) | |**Looking for something else?** | -| | | | -|* :ref:`>> ` | | See the :ref:`libraries` page for interfacing with| -| (shift right) | | particular types of hardware. Try the list of | -| | | `community-contributed code` . Maple links | -| | | against `newlib` and allows the use of any of its | -|**Compound Operators** | | functions; see its documentation for more details.| -| | | | -|* :ref:`++ ` | | | -| (increment) | | | -| | | | -|* :ref:`- - ` | | | -| (decrement) | | | -| | | | -|* :ref:`+= ` | | | -| (compound add) | | | -| | | | -|* :ref:`-= | | | -| ` (compound | | | -| subtract) | | | -| | | | -|* :ref:`*= | | | -| ` (compound | | | -| multiply) | | | -| | | | -|* :ref:`/= | | | -| ` (compound | | | -| divide) | | | -| | | | -|* :ref:`&= | | | -| ` (compound | | | -| bitwise and) | | | -| | | | -|* :ref:`|= | | | -| ` (compound | | | -| bitwise or) | | | -| | | | -+-------------------------------------------------+----------------------------------------------+---------------------------------------------------+ ++--------------------------------------------+----------------------------------------------+---------------------------------------------------+ +| Structure | Variables | Functions | +| | | | ++============================================+==============================================+===================================================+ +|* :ref:`setup() ` |**Constants** |**Digital I/O** | +| | | | +|* :ref:`loop() ` |* :ref:`HIGH ` | |* :ref:`pinMode() ` | +| | :ref:`LOW ` | | +| | |* :ref:`digitalWrite() ` | +|**Control Structures** |* :ref:`INPUT ` | | | +| | :ref:`OUTPUT ` |* :ref:`digitalRead() ` | +|* :ref:`if ` | | | +| |* :ref:`true ` | | | +|* :ref:`if...else ` | :ref:`false ` |**Analog I/O** | +| | | | +|* :ref:`for ` |* :ref:`integer constants |* :ref:`analogRead() ` | +| | ` | | +|* :ref:`switch/case ` | |* :ref:`pwmWrite() ` | +| |* :ref:`floating point constants | (:ref:`analogWrite() ` is | +|* :ref:`while ` | ` | also available, though its use is discouraged) | +| | | | +|* :ref:`do...while ` | | | +| |**Data Types** |**Advanced I/O** | +|* :ref:`break ` | | | +| | The size of each datatype, in bytes, is |* tone(): TODO | +|* :ref:`continue ` | given in parentheses where appropriate. | | +| | |* noTone(): TODO | +|* :ref:`return ` | *Note*: The ``word`` type is (deliberately) | | +| | :ref:`not supported `. |* shiftOut(): TODO | +|* :ref:`goto ` | | | +| |* :ref:`void ` |* pulseIn(): TODO | +| | | | +|**Further syntax** |* :ref:`boolean ` (1 byte) | | +| | |**Time** | +|* :ref:`; (semicolon) ` |* :ref:`char ` (1 byte) | | +| | |* :ref:`millis() ` | +|* :ref:`{} (curly braces) ` |* :ref:`unsigned char | | +| | ` (1 byte) |* :ref:`micros() ` | +|* :ref:`// (single-line comment) | | | +| ` |* :ref:`byte ` (1 byte) |* :ref:`delay() ` | +| | | | +|* :ref:`/\* \*/ (multi-line comment) |* :ref:`int ` (4 bytes) |* :ref:`delayMicroseconds() | +| ` | | ` | +| |* :ref:`unsigned int ` | | +|* :ref:`#define ` | (4 bytes) | | +| | |**Math** | +|* :ref:`#include ` |* :ref:`long ` (8 bytes) | | +| | |* :ref:`min() ` | +| |* :ref:`unsigned long ` | | +|**Arithmetic Operators** | (8 bytes) |* :ref:`max() ` | +| | | | +|* :ref:`= ` |* :ref:`float ` (4 bytes) |* :ref:`abs() ` | +| (assignment operator) | | | +| |* :ref:`double ` (8 bytes) |* :ref:`constrain() ` | +|* :ref:`+ ` (addition) | | | +| |* :ref:`string ` |* :ref:`map() ` | +|* :ref:`- ` | | | +| (subtraction) |* :ref:`array ` |* :ref:`pow() ` | +| | | | +|* :ref:`* ` |* See also: :ref:`built-in types reference |* :ref:`sqrt() ` | +| (multiplication) | `. | | +| | | | +|* :ref:`/ ` (division) | |**Trigonometry** | +| |**Conversion** | | +|* :ref:`% ` (modulo) | |* :ref:`sin() ` | +| |* :ref:`char() ` | | +| | |* :ref:`cos() ` | +|**Comparison Operators** |* :ref:`byte() ` | | +| | |* :ref:`tan() ` | +|* :ref:`== ` (equal to) |* :ref:`int() ` | | +| | | | +|* :ref:`\!= ` |* :ref:`long() ` |**Random Numbers** | +| (not equal to) | | | +| |* :ref:`float() ` |* :ref:`randomSeed() ` | +|* :ref:`< ` (less than) | | | +| |* :ref:`double() ` |* :ref:`random() ` | +|* :ref:`> ` | | | +| (greater than) | | | +| |**Variable Scope & Qualifiers** |**Bits and Bytes** | +|* :ref:`<= ` | | | +| (less than or equal to) |* :ref:`variables `, |* :ref:`lowByte() ` | +| | :ref:`scope ` | | +|* :ref:`>= ` | |* :ref:`highByte() ` is | +| (greater than or equal to) |* :ref:`static ` | provided, though its use is discouraged. | +| | | | +| |* :ref:`volatile ` |* :ref:`bitRead() ` | +|**Boolean Operators** | | | +| |* :ref:`const ` |* :ref:`bitWrite() ` | +|* :ref:`&& ` (and) | | | +| | |* :ref:`bitSet() ` | +|* :ref:`|| ` (or) |**Utilities** | | +| | |* :ref:`bitClear() ` | +|* :ref:`\! ` (not) |* :ref:`sizeof() ` | | +| | (``sizeof`` operator) |* :ref:`bit() ` | +| | | | +|**Pointer Operators** | | | +| | |**External Interrupts** | +|* :ref:`* dereference operator | | | +| ` | |* :ref:`Reference Page ` | +| | | | +|* :ref:`& reference operator | |* :ref:`attachInterrupt() | +| ` | | ` | +| | | | +| | |* :ref:`detachInterrupt() | +|**Bitwise Operators** | | ` | +| | | | +|* :ref:`& ` | | | +| (bitwise and) | |**Interrupts** | +| | | | +|* :ref:`| ` | |* interrupts(): TODO | +| (bitwise or) | | | +| | |* noInterrupts(): TODO | +|* :ref:`^ ` | | | +| (bitwise xor) | | | +| | |**Communication** | +|* :ref:`~ ` | | | +| (bitwise not) | |* :ref:`SerialUSB ` | +| | | | +|* :ref:`\<\< ` | |* :ref:`Serial ` | +| (shift left) | | | +| | |**Looking for something else?** | +|* :ref:`>> ` | | | +| (shift right) | | See the :ref:`libraries` page for interfacing with| +| | | particular types of hardware. Maple links | +| | | against `newlib `_ | +|**Compound Operators** | | and allows the use of any of its functions; see | +| | | its documentation for more details. | +|* :ref:`++ ` | | | +| (increment) | | | +| | | | +|* :ref:`- - ` | | | +| (decrement) | | | +| | | | +|* :ref:`+= ` | | | +| (compound add) | | | +| | | | +|* :ref:`-= | | | +| ` (compound | | | +| subtract) | | | +| | | | +|* :ref:`*= | | | +| ` (compound | | | +| multiply) | | | +| | | | +|* :ref:`/= | | | +| ` (compound | | | +| divide) | | | +| | | | +|* :ref:`&= | | | +| ` (compound | | | +| bitwise and) | | | +| | | | +|* :ref:`|= | | | +| ` (compound | | | +| bitwise or) | | | +| | | | +| | | | ++--------------------------------------------+----------------------------------------------+---------------------------------------------------+ .. _language-missing-features: -- cgit v1.2.3