Discussion of Common Lisp
-
imba
- Posts: 35
- Joined: Sun Nov 21, 2010 2:13 pm
Post
by imba » Fri Nov 26, 2010 11:08 am
Hi,
doesn't produce
With LispWorks Windows. What am I doing wrong?
-
Paul Donnelly
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Post
by Paul Donnelly » Sat Nov 27, 2010 6:29 pm
I think (1 2 (4 5) 3) is prettier than the other. If you want another behaviour, you could write your own printing routine.
-
findinglisp
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
-
Contact:
Post
by findinglisp » Mon Nov 29, 2010 9:25 pm
To follow-up on Paul's post, most pretty printers won't start to indent things until such time as the data gets close to a line length. If it all fits on a single line, per Paul's comment, it's pretty by definition. If you're looking for specific indentation behavior, you might have to write things yourself. Also, sometimes versions of pprint have options that might be able to control the output better.