aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info/mds.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-18 08:27:30 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-18 08:27:30 +0100
commit7b0f630fb902aa2eaae786540314ebb13c0493c0 (patch)
tree185e689004eba12bbd81de22a6875d0ad91c5f6e /doc/info/mds.texinfo
parentm (diff)
downloadmds-7b0f630fb902aa2eaae786540314ebb13c0493c0.tar.gz
mds-7b0f630fb902aa2eaae786540314ebb13c0493c0.tar.bz2
mds-7b0f630fb902aa2eaae786540314ebb13c0493c0.tar.xz
the backslash
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--doc/info/mds.texinfo48
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo
index f06785a..c6c21ea 100644
--- a/doc/info/mds.texinfo
+++ b/doc/info/mds.texinfo
@@ -5176,6 +5176,7 @@ line feeds for new lines.
* Layout Assumptions:: Making assumption about the keyboard layout.
* Include Statement:: Including base files.
* Layout Macros and Functions:: Reducing repetition.
+* Escaping:: Backslashes have so many uses.
@end menu
@@ -5789,6 +5790,53 @@ or function takes.
+@node Escaping
+@subsection Escaping
+
+Similar to most, if not all, programming language, a
+backslash inside quotes can be used to parse the next
+character with special meaning. For instance, `\"' is
+parsed as a literal `"', and `\\' is parsed as a literal
+`\'. `\>' is too parsed as a literal `>', for example
+you may need to write @code{<letter \>>}. The characters
+`(', `)', `[', `]', `@{', `@}', `<' and `,' also follow
+this rule to make those character accesible inside
+a @code{< >}. But `\' can also be used to specify
+characters by their code point, for example if you want
+an `æ' you can write @code{"\u00E6"} or @code{"\uE6"},
+instead of @code{"æ"}. You can also write @code{"\0346"},
+the difference between `\0' and `\u' is that `\0' uses
+octal whereas `\u' uses hexadecimal.
+
+`\' can also be used to access variables and parameters.
+For example `\1' in
+
+@example
+macro letter/2
+ <letter \1> : "\1"
+ <shift letter \1> : "\2"
+ <caps letter \1> : "\2"
+ <shift caps letter \1> : "\1"
+end macro
+letter("å" "Å")
+@end example
+
+is expanded to an `å', where as `\2' is expanded to an `Å'.
+
+`\' is also used to call functions, for example if
+you want to call the function `f/0' you write
+@code{\f()}.
+
+Because numerical (possibly prefixed with an `u') are of
+variable length, it is possible to specify the escape's
+termination point with a dot. For instance, if you
+want the value of the first variable (\1) followed by
+two zeroes, you do not write `\100' as that would expand
+to the value of the hundredth variable. Instead you
+write `\1.00'.
+
+
+
@node Builtin Functions
@section Builtin Functions