In Sizzle, it's as easy as:
emit stdout <- "Hello World!";
In a similar vein, printing out error text goes like this:
emit stderr <- "Something bad happened!";
These work because, behind the scenes, Sizzle predefines special aggregators called 'stdout' and 'stderr' that just echo anything emitted to them out to the terminal:
stdout: table collection of s: string file("/dev/stdout") format("%s\n", s);
stderr: table collection of s: string file("/dev/stderr") format("%s\n", s);
As a side note, when running under Windows, Sizzle uses synthetic equivalents to '/dev/stdout' and '/dev/stderr', so this works under every popular operating system.
No comments:
Post a Comment