Re: cl-quiz
- From: "Geoffrey Summerhayes" <sumrnot@xxxxxxxxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 22:29:41 -0400
"Tel A." <abrahamson.j@xxxxxxxxx> wrote in message news:1146349850.663100.314870@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A question in pertinance to the quiz:
How could one write a format directive something to the effect of
;wrong
(format nil "~r ~a~:p" 10 "apricot")
=> "10 apricots"
(format nil "~r ~a~:p" 1 "apricot")
=> "1 apricot"
I would like it to take two arguments, print the first one as a real
then print the second one, a string, with correct pluralization as per
the first argument.
Anyone done this before?
(format nil "~r ~a~:2*~P" 1 "apricot")
---
Geoff
.
- Follow-Ups:
- Re: cl-quiz
- From: Ari Johnson
- Re: cl-quiz
- References:
- [ANN] cl-quiz
- From: Marco Baringer
- Re: cl-quiz
- From: Tel A.
- [ANN] cl-quiz
- Prev by Date: Re: the bipolar Lisp programmer
- Next by Date: Re: cl-quiz
- Previous by thread: Re: cl-quiz
- Next by thread: Re: cl-quiz
- Index(es):