From 5f1762af205f444b7b0873c324358505faf9fe83 Mon Sep 17 00:00:00 2001 From: halw Date: Fri, 22 Jan 2010 18:24:05 +0000 Subject: [PATCH] Author:halw Date:2010-01-22T18:19:26.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@412 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../eiffel-tutorial-et/et-hello-world.wiki | 2 +- .../eiffel-programming-language-syntax.wiki | 100 +++++++++--------- 2 files changed, 52 insertions(+), 50 deletions(-) diff --git a/documentation/current/method/eiffel-tutorial-et/et-hello-world.wiki b/documentation/current/method/eiffel-tutorial-et/et-hello-world.wiki index 4c0af4f5..58b43897 100644 --- a/documentation/current/method/eiffel-tutorial-et/et-hello-world.wiki +++ b/documentation/current/method/eiffel-tutorial-et/et-hello-world.wiki @@ -61,7 +61,7 @@ The body of the feature is introduced by the do keyword and termina * put_string outputs a string, passed as argument, here "Hello World". * put_new_line terminates the line. -Rather than using a call to put_new_line, the first version of the class simply includes a new-line character, denoted as %N , at the end of the string. Either technique is acceptable. +Rather than using a call to put_new_line, the first version of the class simply includes a new-line character, denoted as %N (the percent sign is used to introduce codes for [[Eiffel language syntax#Special characters|special characters]]), at the end of the string. Either technique is acceptable. You may have noticed another difference between the two versions. The first version uses a call to print where the second uses io.put_string . Here too, the effect is identical and either technique is acceptable. In the next section, you will begin to see how things like io and print become available for use in a class like HELLO. diff --git a/documentation/current/method/quick-reference-eiffel-programming-language/eiffel-programming-language-syntax.wiki b/documentation/current/method/quick-reference-eiffel-programming-language/eiffel-programming-language-syntax.wiki index 68b5ecd7..7a8aa3b9 100644 --- a/documentation/current/method/quick-reference-eiffel-programming-language/eiffel-programming-language-syntax.wiki +++ b/documentation/current/method/quick-reference-eiffel-programming-language/eiffel-programming-language-syntax.wiki @@ -40,11 +40,60 @@ No intervening character (blank or otherwise) is permitted between these element ===Strings=== -A string -- specimen of construct String -- is a sequence of zero or more manifest characters, possibly containing [[#Special characters|codes for special characters]]. +A string -- specimen of construct String -- is a sequence of zero or more manifest characters. ===Simple strings=== -A simple string -- specimen of Simple_string -- is a [[#Strings|String]] consisting of at most one line (that is to say, containing no embedded new-line manifest character). +A simple string -- specimen of Simple_string -- is a [[#Strings|String]] consisting of at most one line (that is to say, containing no embedded new-line manifest character), possibly containing [[#Special characters|codes for special characters]]. + +===Special characters=== + +{| border="2" +|+ Special Characters and Their Codes +! Character || Code || Mnemonic name +|- +| @ || %A || At-sign +|- +| BS || %B || Backspace +|- +| ^ || %C || Circumflex +|- +| $ || %D || Dollar +|- +| FF || %F || Form feed +|- +| \ || %H || Backslash +|- +| ~ || %L || Tilde +|- +| NL (LF) || %N || Newline +|- +| ` || %Q || Backquote +|- +| CR || %R || Carriage return +|- +| # || %S || Sharp +|- +| HT || %T || Horizontal tab +|- +| NUL || %U || Null +|- +| | || %V || Vertical bar +|- +| % || %% || Percent +|- +| ' || %' || Single quote +|- +| " || %" || Double quote +|- +| [ || %( || Opening bracket +|- +| ] || %) || Closing bracket +|- +| { || %< || Opening brace +|- +| } || %> || Closing brace +|} ===Line wrapping parts=== @@ -548,52 +597,5 @@ Digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |
"a" | "b" | "c" | "d" | "e" | "f" |
"A" | "B" | "C" | "D" | "E" | "F" | "_"

-===Special characters=== -{| border="2" -|+ Special Characters and Their Codes -! Character || Code || Mnemonic name -|- -| @ || %A || At-sign -|- -| BS || %B || Backspace -|- -| ^ || %C || Circumflex -|- -| $ || %D || Dollar -|- -| FF || %F || Form feed -|- -| \ || %H || Backslash -|- -| ~ || %L || Tilde -|- -| NL (LF) || %N || Newline -|- -| ` || %Q || Backquote -|- -| CR || %R || Carriage return -|- -| # || %S || Sharp -|- -| HT || %T || Horizontal tab -|- -| NUL || %U || Null -|- -| | || %V || Vertical bar -|- -| % || %% || Percent -|- -| ' || %' || Single quote -|- -| " || %" || Double quote -|- -| [ || %( || Opening bracket -|- -| ] || %) || Closing bracket -|- -| { || %< || Opening brace -|- -| } || %> || Closing brace -|}