X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=demos%2Fadvanced-hello-world.c;h=a5475ba5efc3e313d4cf3b51913c0d3210766bf8;hb=3fa0c74773fa632501756e88ec11a2929b171bb5;hp=7117279b1ba688498733f03a5041103066b38655;hpb=6e567bcce620b5312125f920e88c68a1404e71bf;p=svn%2FCll1h%2F.git diff --git a/demos/advanced-hello-world.c b/demos/advanced-hello-world.c index 7117279..a5475ba 100644 --- a/demos/advanced-hello-world.c +++ b/demos/advanced-hello-world.c @@ -6,15 +6,25 @@ program echo("Hello"," ","world"," !\n"); print("* print()"); print("Hello","world","!"); - print("* MAYBE ?"); - repeat(4) print((MAYBE ? "Hello" : "Hi"), (MAYBE ? "world" : "friend"), (MAYBE ? "!" : "?")); - print("* WHOKNOWS ?"); - repeat(4) print((WHOKNOWS ? "Hello" : "Hi"), (WHOKNOWS ? "world" : "friend"), (WHOKNOWS ? "!" : "?")); print("* NIL"); print("We can print",NULL,"safely."); + NIL="(hic sunt crocodiles)"; + print("We can print",NULL,"safely."); print("* coalesce():"); - print("We can",coalesce("print","anything"),coalesce(NULL,"anything"),"safely."); + print("We can",coalesce("print","everything"),"almost",coalesce(NULL,"anything"),"safely."); + echo("Surprisingly ->",NIL," (you can't see this)"); + print("<- nothing special here."); print("* OFS"); + OFS=""; + EOL=""; + print("We","Can","Print","Without","Spaces","BetweenArgs."); OFS=":"; - print("We","can","customize","print"); + print("We","can","customize","print."); + OFS="..."; + EOL="<--\n"; + print(""); + print("* MAYBE ?"); + repeat(4) print((MAYBE ? "Hello" : "Hi"), (MAYBE ? "world" : "friend"), (MAYBE ? "!" : "?")); + print("* WHOKNOWS ?"); + repeat(4) print((WHOKNOWS ? "Hello" : "Hi"), (WHOKNOWS ? "world" : "friend"), (WHOKNOWS ? "!" : "?")); }