Navigation
Synopsis Print a value to the output stream and add a newline.
Function
  1. void println(value arg)
  2. void println()
Usage import IO;
Description Print a value on the output stream followed by a newline. See print for a version that does not add a newline and printlnExp for a version that returns its argument as value.
Examples
rascal>import IO;
ok
rascal>println("Hello World");
Hello World
ok
Introduce variable S and print it:
rascal>S = "Hello World";
str: "Hello World"
rascal>println(S);
Hello World
ok
Introduce variable L and print it:
rascal>L = ["a", "b", "c"];
list[str]: ["a","b","c"]
rascal>println(L);
["a","b","c"]
ok
Use a string template to print several values:
rascal>println("<S>: <L>");
Hello World: ["a","b","c"]
ok
Just print a newline
rascal>println();

ok
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.