diff options
author | Ludovic Courtès | 2008-02-05 19:11:04 +0100 |
---|---|---|
committer | Ludovic Courtès | 2008-02-05 19:11:04 +0100 |
commit | e89efdd5d11a8571b4fc3d71c2ec9cd235e0bad5 (patch) | |
tree | c0407c2be59f00f85fcf62b76b928f9c88f4f86d /doc/user/src | |
parent | 93d003395b34b9a6da59fbbe155ae2b770350e49 (diff) | |
download | skribilo-e89efdd5d11a8571b4fc3d71c2ec9cd235e0bad5.tar.gz skribilo-e89efdd5d11a8571b4fc3d71c2ec9cd235e0bad5.tar.lz skribilo-e89efdd5d11a8571b4fc3d71c2ec9cd235e0bad5.zip |
doc: Document C/Java source highlighting.
Diffstat (limited to 'doc/user/src')
-rw-r--r-- | doc/user/src/prgm4.skb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/user/src/prgm4.skb b/doc/user/src/prgm4.skb new file mode 100644 index 0000000..734de54 --- /dev/null +++ b/doc/user/src/prgm4.skb @@ -0,0 +1,28 @@ +(use-modules (skribilo source c)) + +(p [Here's how:]) + + (linebreak) + (prog + (source :language c +[#include <stdlib.h> + +static int foo = 10; +static float bar; + +/* This is the function responsible + for integer chbouibification. */ +float +chbouibify (int x) +{ + bar = foo + (float) x / random (); + foo = (float) x * random (); + + if (x > 2) + /* Great! */ + printf ("hello world!\n"); + else + printf ("lower than two\n"); + + return ((float) foo * bar); +}])) |