124788a5f180d5cb9a86f637898fe31d91a900a3
[svn/Cll1h/.git] / demos / advanced-hello-world.c
1 #include "cll1.h"
2
3 program
4 {
5 print("* echo()");
6 echo("Hello"," ","world"," !\n");
7 print("* print()");
8 print("Hello","world","!");
9 print("* NIL");
10 print("We can print", NULL, "safely.");
11 NIL="(hic sunt crocodiles)";
12 print("We can print", NULL, "safely.");
13
14 {
15 str p = "print", a = NULL;
16 print("* coalesce():");
17 print("We can", coalesce(p, "everything"), "almost", coalesce(a, "anything"), "safely.");
18 }
19
20 echo("Surprisingly ->",NIL," (you can't see this)");
21 print("<- nothing special here.");
22 print("* OFS");
23 OFS="";
24 EOL="";
25 print("We","Can","Print","Without","Spaces","BetweenArgs.");
26 OFS=":";
27 print("We","can","customize","print.");
28 OFS="...";
29 EOL="<--\n";
30 print("");
31 print("* MAYBE ?");
32 repeat(4) print((MAYBE ? "Hello" : "Hi"), (MAYBE ? "world" : "friend"), (MAYBE ? "!" : "?"));
33 print("* WHOKNOWS ?");
34 repeat(4) print((WHOKNOWS ? "Hello" : "Hi"), (WHOKNOWS ? "world" : "friend"), (WHOKNOWS ? "!" : "?"));
35 }
This page took 0.272097 seconds and 3 git commands to generate.