Output truncated

Discussion of Common Lisp
Post Reply
jarecsni
Posts: 3
Joined: Tue Jan 17, 2017 3:18 pm

Output truncated

Post by jarecsni » Tue Jan 17, 2017 3:22 pm

Hi, I'm new to this list and lisp :) so apologies for the nature of this question. I'm using Allegro CL and it seems longer lists are abbreviated when output on the console. Does anyone know how to control this behaviour if at all possible.

pjstirling
Posts: 166
Joined: Sun Nov 28, 2010 4:21 pm

Re: Output truncated

Post by pjstirling » Thu Jan 19, 2017 3:30 am

You probably want *print-readably*, but if you only care about avoiding the truncation you can bind *print-lines*, and *print-level* and *print-length*.

If you are using FORMAT then you will also want to use ~w instead of ~a

jarecsni
Posts: 3
Joined: Tue Jan 17, 2017 3:18 pm

Re: Output truncated

Post by jarecsni » Fri Jan 20, 2017 2:36 pm

Works a treat, thanks!

jarecsni
Posts: 3
Joined: Tue Jan 17, 2017 3:18 pm

Re: Output truncated

Post by jarecsni » Fri Jan 20, 2017 3:29 pm

Another quick question, what's the way to ensure these variables are set each time Allegro starts up?

pjstirling
Posts: 166
Joined: Sun Nov 28, 2010 4:21 pm

Re: Output truncated

Post by pjstirling » Fri Jan 20, 2017 4:03 pm

Presumably allegro has an init file, but I've never used allegro so I cant tell you what it is.

Generally speaking you don't want to globally make changes to the pretty-printer variables, you should temporarily bind them with LET to the values you want for the print call in question.

Post Reply