doc/concepts.tex: Replace prose description by a source example.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 27 Jul 2019 11:40:52 +0000 (12:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 3 Aug 2019 15:27:37 +0000 (16:27 +0100)
doc/concepts.tex

index 73ce9ed..3ab3da8 100644 (file)
@@ -349,8 +349,14 @@ nickname.  Each of these members is also a structure, containing the
 corresponding class's slots, one member per slot.  There's nothing special
 about these slot members: C code can access them in the usual way.
 
-For example, if @|MyClass| has the nickname @|mine|, and defines a slot @|x|
-of type @|int|, then the simple function
+For example, given the definition
+\begin{prog}
+  [nick = mine]                                                 \\
+  class MyClass: SodObject \{                                   \\ \ind
+    int x;                                                    \-\\
+  \}
+\end{prog}
+the simple function
 \begin{prog}
   int get_x(MyClass *m) \{ return (m@->mine.x); \}
 \end{prog}