chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] [Q] How can I limit print level and length?


From: Felix
Subject: Re: [Chicken-users] [Q] How can I limit print level and length?
Date: Fri, 28 Jun 2013 13:50:34 +0200 (CEST)

From: Sungjin Chun <address@hidden>
Subject: [Chicken-users] [Q] How can I limit print level and length?
Date: Fri, 28 Jun 2013 16:46:51 +0900

> Hi,
> 
> I want to set the limit of the length of printed string. In SLIME(for SBCL)
> I can do this
> with following;
> 
> (setq *PRINT-LEVEL* 10)
> (setq *PRINT-LENGTH* 20)
> 
> How can I do this with Chicken Scheme (in chicken-slime in Emacs)?

There is no official way to do it, but you can use the internal
API (with the usual grain of salt):

(##sys#with-print-length-limit LIMIT THUNK)

It's not fully accurate, but it works well enough to avoid hangups
when printing huge or circular data.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]