4

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?

1 Answer 1

14

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.