Common Lisp Tips — Multi-line format control strings

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

Multi-line format control strings

You can break up long format control strings with ~ at the end of a line. For example:

* (format t "It was the best of times, ~
             it was the worst of times.")
It was the best of times, it was the worst of times.

The ~, newline, and all whitespace following the newline are removed from the output, so you can align the continued control string with the previous line.

The : and @ modifiers have additional meaning:

With a :, the newline is ignored, but any following whitespace is left in place. With an @, the newline is left in place, but any following whitespace is ignored.