Re: FORMAT ~<...~:@> PUZZLE
- From: Peter Seibel <peter@xxxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 22:25:15 GMT
"Geoffrey Summerhayes" <sumrnot@xxxxxxxxxxx> writes:
> Peter Seibel wrote:
>> "Geoffrey Summerhayes" <sumr...@xxxxxxxxxxx> writes:
>>> Vladimir Zolotykh wrote:
>>>>
>>>> What's wrong? I'd expect that calls with n less that 50 (e.g 20, 30, 40)
>>>> would also print _formatted_ paragraph. Where was I wrong?
>>>
>>> Try:
>>> (format t "~@<~{~A~^ ~:_~}~:@>" a)))
>> What's the value of *print-miser-width*? Because if I have it set to
>> something non NIL that doesn't help. In fact it makes it worse (see below).
>
> Realized after posting I should have included that...
>
> (defun foo (n)
> (let ((*print-right-margin* n)
> (*print-miser-width* nil)
> (a '("Whan" "you're" "lost" "in" "the" "Wild,"
> "and" "you're" "scared" "as" "a" "child,"
> "And" "Death" "looks" "you" "bang"
> "in" "the" "eye,")))
> (format t "~@<~{~A~^ ~:_~}~:@>" a)))
So it seems to me that with *PRINT-MISER-WIDTH* set to NIL you don't
need the ~:_ at all.
-Peter
--
Peter Seibel * peter@xxxxxxxxxxxxxxx
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
.
- Follow-Ups:
- Re: FORMAT ~<...~:@> PUZZLE
- From: Geoffrey Summerhayes
- Re: FORMAT ~<...~:@> PUZZLE
- References:
- FORMAT ~<...~:@> PUZZLE
- From: Vladimir Zolotykh
- Re: FORMAT ~<...~:@> PUZZLE
- From: Geoffrey Summerhayes
- Re: FORMAT ~<...~:@> PUZZLE
- From: Peter Seibel
- Re: FORMAT ~<...~:@> PUZZLE
- From: Geoffrey Summerhayes
- FORMAT ~<...~:@> PUZZLE
- Prev by Date: Re: FORMAT ~<...~:@> PUZZLE
- Next by Date: Re: Reddit Guys on the Pros and Cons of Lisp
- Previous by thread: Re: FORMAT ~<...~:@> PUZZLE
- Next by thread: Re: FORMAT ~<...~:@> PUZZLE
- Index(es):
Relevant Pages
|