How to print a new line in lisp?
Asked Answered
C

1

5

I have tried a lot to print a new line in lisp. I want to print a new line like java (system.out.println()), and not necessarily having anything. I know that print goes to a new line however I must have a variable inside it. Is there a function in lisp that does not need a variable and goes to a new line?

Civic answered 1/3, 2019 at 22:58 Comment(0)
B
15

Use the TERPRI function (the name stands for "terminate printing", as it's intended to be used to terminate a line of output).

(terpri)

You could also use FRESH-LINE. This prints a newline unless you're already at the start of a line.

Bor answered 1/3, 2019 at 23:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.