mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
20 lines
260 B
Nim
20 lines
260 B
Nim
discard """
|
|
output: '''0
|
|
|12|
|
|
34
|
|
'''
|
|
"""
|
|
|
|
template optWrite{
|
|
write(f, x)
|
|
((write|writeln){w})(f, y)
|
|
}(x, y: varargs[expr], f, w: expr) =
|
|
w(f, "|", x, y, "|")
|
|
|
|
if true:
|
|
echo "0"
|
|
write stdout, "1"
|
|
writeln stdout, "2"
|
|
write stdout, "3"
|
|
echo "4"
|