| 1 | (use-modules (skribilo source c)) |
| 2 | |
| 3 | (document |
| 4 | :title [square] |
| 5 | (chapter |
| 6 | :title (source :language c [square()\;]) |
| 7 | (p [here's the output of ,(prog (source :language c [square()\;]))]) |
| 8 | (figure |
| 9 | :legend "square();" |
| 10 | (image :file "square.png" :height 500)) |
| 11 | (p [openscad draws a square for the code |
| 12 | ,(source :language c [square()\;]).]) |
| 13 | (p [there are a couple other things worth noting here. |
| 14 | square is followed by an open and close parenthesis |
| 15 | ,(source :language c [()]), and then by a semicolon |
| 16 | ,(source :language c [\;])])) |
| 17 | (chapter |
| 18 | :title [square(1)\;] |
| 19 | (p [here's the output of ,(source :language c [square(1)\;])]) |
| 20 | (figure |
| 21 | :legend "square(1);" |
| 22 | (image :file "square1.png" :height 500)) |
| 23 | (p [note that it's identical to the |
| 24 | ,(source :language c [square()\;]) output. this is because |
| 25 | by default, openscad guesses a value of 1 whenever a value |
| 26 | is left unspecified.])) |
| 27 | (chapter |
| 28 | :title [square(2)\;] |
| 29 | (p [here's the output of ,(source :language c [square(2)\;])]) |
| 30 | (figure |
| 31 | :legend "square(2);" |
| 32 | (image :file "square2.png" :height 500)))) |