X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;ds=sidebyside;f=demos%2Fadvanced-hello-world.c;h=07a14b851a91763e7b8a46283dce1f3b48c2e8b7;hb=005431b86f12649bcb4e2dd230c8ef4d4347cd35;hp=1212211d5f2378680cb28b482e43668bc3fcffc0;hpb=5a5eb547235b4b5f306022cbfd6727828cc622e5;p=svn%2FCll1h%2F.git diff --git a/demos/advanced-hello-world.c b/demos/advanced-hello-world.c index 1212211..07a14b8 100644 --- a/demos/advanced-hello-world.c +++ b/demos/advanced-hello-world.c @@ -2,6 +2,22 @@ program { - echo("Hello ",NULL,"world"," ! "); - print("Hello","world",NULL,"!"); + print("* echo()"); + echo("Hello"," ","world"," !\n"); + print("* print()"); + print("Hello","world","!"); + print("* NIL"); + print("We can print",NULL,"safely."); + NIL="(anything)"; + print("We can print",NULL,"safely."); + print("* coalesce():"); + print("We can",coalesce("print","everything"),coalesce(NULL,"everything"),"safely."); + print("* OFS"); + OFS=":"; + print("We","can","customize","print"); + OFS="..."; + print("* MAYBE ?"); + repeat(4) print((MAYBE ? "Hello" : "Hi"), (MAYBE ? "world" : "friend"), (MAYBE ? "!" : "?")); + print("* WHOKNOWS ?"); + repeat(4) print((WHOKNOWS ? "Hello" : "Hi"), (WHOKNOWS ? "world" : "friend"), (WHOKNOWS ? "!" : "?")); }