I came across a piece of code which uses the ~V directive to pass an
arguement to the ~T (tab) directive in a format statement. So
(format nil "~VThello" 3) => " hello"
it also seems to work with other ~ directives too, such as ~A. So,
(format nil "~VA" 10 'hello) => "hello "
the ~V is not documented in either CLtL I or II. Does anyone have any info on
this?
tom eskridge
computing research laboratory, new mexico state university
········@nmsu.edu (505) 646-6247
--
tom eskridge
computing research laboratory, new mexico state university
········@nmsu.edu (505) 646-6247
In article <······················@illyria.nmsu.edu> ········@nmsu.edu (Tom Eskridge) writes:
>the ~V is not documented in either CLtL I or II. Does anyone have any info on
>this?
>tom eskridge
there is no ~V, however, V may be used as a prefix parameter.
p386 CLtL:
the V prefix parameter takes an argument from arguments as a parameter to
the directive. ... This feature allows variable-width fields and the like.
If you were so disposed, you could use ~V,V,V,VA
--
-- jeff
seismo!godot.think.com!mincy
In article <······················@illyria.nmsu.edu> ········@nmsu.edu (Tom Eskridge) writes:
>
>I came across a piece of code which uses the ~V directive to pass an
>arguement to the ~T (tab) directive in a format statement. So
> (format nil "~VThello" 3) => " hello"
[stuff deleted]
>
>the ~V is not documented in either CLtL I or II. Does anyone have any info on
>this?
>
Actually, it is documented in CLTL/II (but - like a certain amount of the
format stuff - really hard to find). On page 582:
In place of a prefix parameter to a directive, you can put the
letter V (or v), which takes an argument from _arguments_ for
use as a parameter to the directive. Normally this should be an
integer or character object, as appropriate. This feature allows
variable-width fields and the like. If the argument used by a V
parameter is nil, the effect is as if the parameter had been omitted.
It's not the ~V command (the "~" doesn't belong to the V, but to the command
it modifies).
- Mark.