Subject: question about format

From: [email-masked] (Dan Stanger)
Date: Fri, 25 Aug 1995 15:02:20 -0600

i want to use format to concatonate 3 strings in a fixed length field.
for example:
(format nil "~16a" (format nil "~A~A~A" "123" "456" "123"))
"123456123       "
however in the above example i need to do 2 formats, one to concatenate
the strings, the other to put it into a fixed length field.
is is possible to do this with one format call?
thanks,
dan stanger
[email-masked]

---

From: Marcus Daniels <[email-masked]>
Date: Fri, 25 Aug 1995 20:12:06 GMT

>>>>> "Dan" == Dan Stanger <[email-masked]> writes:

Dan> i want to use format to concatonate 3 strings in a fixed length
Dan> field.  for example: 

Dan> (format nil "~16a" (format nil "~A~A~A" "123" "456" "123"))
Dan> "123456123 "

Dan> however in the above example i
Dan> need to do 2 formats, one to concatenate the strings, the other
Dan> to put it into a fixed length field.  is is possible to do this
Dan> with one format call? 

Here is one way:

(format nil "~16@<~@{~A~}~>" "123" "456" "123")