diff options
author | Araq <rumpf_a@web.de> | 2011-02-13 21:24:52 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-02-13 21:24:52 +0100 |
commit | 55c40746474cff452c09fa9c1244e3d0c7b3ad21 (patch) | |
tree | 3c3f4cf72a24b98ecabc7f259cc3018ad936ddb9 /doc/nimrodc.txt | |
parent | c717304ce61acdf7f980bc4ed185e7ea9e886dd5 (diff) | |
download | Nim-55c40746474cff452c09fa9c1244e3d0c7b3ad21.tar.gz |
REPL improvements
Diffstat (limited to 'doc/nimrodc.txt')
-rwxr-xr-x | doc/nimrodc.txt | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index c4b61a14f..a712d109b 100755 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -57,7 +57,12 @@ configuration file that is read automatically. This specific file has to be in the same directory as the project and be of the same name, except that its extension should be ``.cfg``. -Command line settings have priority over configuration file settings. +Command line settings have priority over configuration file settings. + +The default build of a project is a `debug build`:idx:. To compile a +`release build`:idx: define the ``release`` symbol:: + + nimrod c -d:release myproject.nim Generated C code directory @@ -224,6 +229,22 @@ The `volatile`:idx: pragma is for variables only. It declares the variable as ``volatile``, whatever that means in C/C++. **Note**: This pragma will not exist for the LLVM backend. + + +Nimrod interactive mode +======================= + +The Nimrod compiler supports an `interactive mode`:idx:. This is also known as +a `REPL`:idx: (*read eval print loop*). If Nimrod has been built with the +``-d:useGnuReadline`` switch, it uses the GNU readline library for terminal +input management. To start Nimrod in interactive mode use the command +``nimrod i``. To quit use the ``quit()` command. To determine whether an input +line is an incomplete statement to be continued these rules are used: + +1. The line ends with ``[-+*/\\<>!\?\|%&$@~,;:=#^]\s*$``. +2. The line starts with a space (indentation). +3. The line is within a triple quoted string literal. However, the detection + does not work if the line contains more than one ``"""``. Debugging with Nimrod |