|
Humpton Apprentice
Joined: 10 Oct 2000 Posts: 158 Location: Chicago, IL
|
Posted: Mon Nov 04, 2002 3:45 am
%format |
Is there a way to use a variable in the &s part of the format string?
#SHOW %format("&s &s &s",%item(@MagicPotionList,@Counter),"-","Description Info") works as expected - but nothing special. With different values for @Counter the %item returned is different and usually of a different length. I'm trying to set up a table of sorts so was hoping that this
#SHOW %format("&s &(20-%len(%item(@MagicPotionList,@Counter)))s &s",%item(@MagicPotionList,@Counter),"-","Description Info") would allow me to have the '-'s all lined up nicely. Alas, not. And nor does just putting in a @Variable.
Any ideas?
Stay JOLLY!
H
___
Humpton lives like he types.... fast, and full of mistakes!
Core 2651: For those who prefer the future to the past. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Nov 04, 2002 6:27 am |
If you just want things lined up use the number with the first &s.
%format("&20s &s &s", %item(@MagicPotionList, @Counter), "-", "Description Info")
LightBulb
Senior Member |
|
|
|
Humpton Apprentice
Joined: 10 Oct 2000 Posts: 158 Location: Chicago, IL
|
Posted: Mon Nov 04, 2002 1:23 pm |
Yeah, that was my bail out option, but I wanted to pad the end of it not the front of it. That's why I did it on the '-'.
Stay JOLLY!
H
___
Humpton lives like he types.... fast, and full of mistakes!
Core 2651: For those who prefer the future to the past. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|