![]() |
|
Navigation |
Synopsis Print a value to the output stream and add a newline.
Function
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 okIntroduce variable S and print it: rascal>S = "Hello World"; str: "Hello World" rascal>println(S); Hello World okIntroduce variable L and print it: rascal>L = ["a", "b", "c"]; list[str]: ["a","b","c"] rascal>println(L); ["a","b","c"] okUse a string template to print several values: rascal>println("<S>: <L>");
Hello World: ["a","b","c"]
ok
Just print a newline
rascal>println();
ok
![]() |