aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/cpp_prog
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:35:24 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:35:24 +0000
commitd4b68bb27f42afb8338f35f9fda0c467ec5d8787 (patch)
tree26e8947ef0a82e8150e46ebd0b257ec5cd13c0ed /doc/user/cpp_prog
parent2c0ebbabd66ba21d3224bf58678bf62998b94c2c (diff)
downloadlout-d4b68bb27f42afb8338f35f9fda0c467ec5d8787.tar.gz
Lout 3.18.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@5 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'doc/user/cpp_prog')
-rw-r--r--doc/user/cpp_prog35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/user/cpp_prog b/doc/user/cpp_prog
new file mode 100644
index 0000000..a049e3d
--- /dev/null
+++ b/doc/user/cpp_prog
@@ -0,0 +1,35 @@
+@Section
+ @Title { Embedding program text within program comments }
+ @Tag { cpp_prog }
+@Begin
+@PP
+The standard reference for the Eiffel language @Cite { $meyer1992eiffel }
+specifies that identifiers within comments may or should be enclosed
+in ` and ' so that they may be noticed and printed in an italic
+font:
+@ID lines @Break @F @Verbatim {
+@ID @Eiffel {
+deposit(amount: REAL) is
+ -- deposit `amount' dollars
+}
+}
+produces
+@ID @Eiffel {
+deposit(amount: REAL) is
+ -- deposit `amount' dollars
+}
+This has been generalized in Lout: arbitrary text within an
+Eiffel comment between ` and ' will be treated as Eiffel text and
+printed accordingly. Some other languages may also offer this
+feature: see the fifth column of the table at the start of this
+chapter. In principle the precise means of getting it could vary
+from language to language, but the languages available at the moment
+either do not have it at all, or else they use ` and ' like Eiffel.
+@PP
+On the subject of Eiffel, the Eiffel reference @Cite { $meyer1992eiffel }
+has some quite detailed style guidelines, and these have been closely
+followed in the implementation of the @Code "@Eiffel" symbol. In
+particular, @Code "@Eiffel" prints dots larger than usual when they
+denote feature calls, as the example @OneCol @Eiffel { account.deposit(20) }
+shows.
+@End @Section