Output truncated

Discussion of Common Lisp

Output truncated

Postby 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.
jarecsni
 
Posts: 3
Joined: Tue Jan 17, 2017 3:18 pm

Re: Output truncated

Postby 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
pjstirling
 
Posts: 128
Joined: Sun Nov 28, 2010 4:21 pm

Re: Output truncated

Postby 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

Postby 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?
jarecsni
 
Posts: 3
Joined: Tue Jan 17, 2017 3:18 pm

Re: Output truncated

Postby 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.
pjstirling
 
Posts: 128
Joined: Sun Nov 28, 2010 4:21 pm


Return to Common Lisp

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron