Zard Language
print() vs println()
Zard provides two basic functions to display output: print() and println().
print(value): prints the given value without adding a newline at the end.println(value): prints the given value and adds a newline after it.
Examples
main {
print(1);
print(2);
print(3);
println("");
println("Hello");
println("World");
}
Output:
123
Hello
World
Notes
- Each call to
print()continues on the same line. println()automatically moves to the next line after printing.- Currently,
print()only accepts one argument at a time.
Summary
print()– print a value inline, no newline.println()– print a value and move to a new line.