source: project/wiki/wiki-syntax-chicken @ 8603

Last change on this file since 8603 was 8603, checked in by azul, 12 years ago

Changes applied for azul (193.142.125.1) through svnwiki:

Creating

File size: 1.3 KB
Line 
1== Introduction
2
3This page describes the syntax that will be implemented by Alejandro Forero Cuervo for the Chicken wiki.
4
5== Tags for procedure-like definitions
6
7We will add support for the following tags:
8
9* {{procedure}}
10* {{macro}}
11
12Each of these should be used as follows:
13
14 <nowiki>&lt;procedure>(string-append a b ...)&lt;/procedure></nowiki>
15
16This will be rendered as follows (with some divs and spans for easy CSSing):
17
18[procedure] {{('''string-append''' a b ...)}}
19
20== Tags for other definitions
21
22The following tags will also be supported:
23
24* read
25* parameter
26* record
27* string
28* class
29* method
30
31They should be used as follows:
32
33 <nowiki>&lt;string>doctype:xhtml-1.0-strict&lt;/string></nowiki>
34
35They will be rendered as follows:
36
37[string] {{'''doctype:xhtml-1.0-strict'''}}
38
39== Tags for examples
40
41If you want to include examples, use the following code:
42
43 <nowiki>
44 &lt;example>
45 &lt;expr>(string-append "foo" "bar")&lt;/expr>
46 &lt;result>"foobar"<&lt;result>
47 &lt;/example>
48 </nowiki>
49
50If the example shows some interaction, use this:
51
52 <nowiki>
53 &lt;example>
54 &lt;expr>(prompt-for-number-and-show-factorial)&lt;/expr>
55 &lt;output>Enter a number:&lt;/output>
56 &lt;input>4&lt;/input>
57 &lt;output>24&lt;/output>
58 &lt;result>24&lt;/result>
59 &lt;/example>
60 </nowiki>
61
62If the result of the evaluation is not specified, omit the <nowiki>&lt;result></nowiki> part.
Note: See TracBrowser for help on using the repository browser.