summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-01-16 23:16:29 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-01-16 23:16:29 +0100
commit6c5693e6339f08af2de2af3578ac048187625a23 (patch)
treeecb54196f8bad4d00a0dfb26373f87e0c8bf0da1 /doc
parent0bcdab83953075526c0298e025c8feec75b19d90 (diff)
downloadNim-6c5693e6339f08af2de2af3578ac048187625a23.tar.gz
implemented extended quoting rules
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/manual.txt27
-rwxr-xr-xdoc/nimrodc.txt6
2 files changed, 29 insertions, 4 deletions
diff --git a/doc/manual.txt b/doc/manual.txt
index 8a1d9110c..d2bfde138 100755
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -215,7 +215,15 @@ String literals can also be delimited by three double quotes
 Literals in this form may run for several lines, may contain ``"`` and do not
 interpret any escape sequences.
 For convenience, when the opening ``"""`` is immediately followed by a newline,
-the newline is not included in the string.
+the newline is not included in the string. The ending of the string literal is
+defined by the pattern ``"""[^"]``, so this:
+  
+.. code-block:: nimrod 
+  """"long string within quotes""""
+  
+Produces::
+  
+  "long string within quotes"
 
 
 Raw string literals
@@ -230,6 +238,19 @@ convenient for regular expressions or Windows paths:
 
   var f = openFile(r"C:\texts\text.txt") # a raw string, so ``\t`` is no tab
 
+To produce a single ``"`` within a raw string literal, it has to be doubled:
+
+.. code-block:: nimrod
+
+  r"a""b"
+  
+Produces::
+  
+  a"b
+
+``r""""`` is not possible with this notation, because the three leading 
+quotes introduce a triple quoted string literal. 
+
 
 Generalized raw string literals
 -------------------------------
@@ -291,8 +312,8 @@ prefix), binary (prefix ``0b``), octal (prefix ``0o``) and hexadecimal
 
 There exists a literal for each numerical type that is
 defined. The suffix starting with an apostrophe ('\'') is called a
-`type suffix`:idx:. Literals without a type prefix are of the type ``int``,
-unless the literal contains a dot or an ``E`` in which case it is of
+`type suffix`:idx:. Literals without a type suffix are of the type ``int``,
+unless the literal contains a dot or ``E|e`` in which case it is of
 type ``float``.
 
 The type suffixes are:
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index d35ea68c8..79ce06ad1 100755
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -42,12 +42,16 @@ Configuration file
 The default configuration file is ``nimrod.cfg``. The ``nimrod`` executable
 looks for it in the following directories (in this order):
 
-1. ``/home/$user/.config/nimrod.cfg`` (UNIX) or ``$APPDATA/nimrod.cfg`` (Windows)
+1. ``/home/$user/.config/nimrod.cfg`` (UNIX) or ``%APPDATA%/nimrod.cfg`` (Windows)
 2. ``$nimrod/config/nimrod.cfg`` (UNIX, Windows)
 3. ``/etc/nimrod.cfg`` (UNIX)
 
 The search stops as soon as a configuration file has been found. The reading
 of ``nimrod.cfg`` can be suppressed by the ``--skipCfg`` command line option.
+
+**Note:** The *project file name* is the name of the ``.nim`` file that is 
+passed as a command line argument to the compiler. 
+
 Configuration settings can be overwritten in a project specific
 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