![](templates/Classic/images/spacer.gif) |
thegto Beginner
Joined: 12 Jun 2007 Posts: 20
|
Posted: Mon Jul 07, 2008 3:09 am
How to add blank char (spacebar) to set alignment ? |
Code: |
Column1 Column2 column3
XXXXXX YYYYYY
ZZZZZZ AAAAA |
I capture these info to new window, but .....
How can I set XXXXX or ZZZZZ stay at the column2 and YYYYYY or AAAAA stay at column3. It looks like above
Is there any command which is easier than what I did ?
I did use %char( 160) to send blank character.
Code: |
#say %char( 160)%char( 160)%char( 160)%char( 160)%char( 160)%char( 160)XXXXXX%char( 160)%char( 160)%char( 160)%char( 160)%char( 160)%char( 160)YYYYY
|
|
|
|
![](templates/Classic/images/spacer.gif) |
Tech GURU
![](images/avatars/172896370346230b24779a1.gif)
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jul 07, 2008 5:23 am |
I believe you're looking for the %format function.
|
|
_________________ Asati di tempari! |
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jul 07, 2008 10:13 am |
%format's the easiest way. Have a play with it:
#say |%format("&20s","hello")|
#say |%format("&-20s","hello")| |
|
|
![](templates/Classic/images/spacer.gif) |
thegto Beginner
Joined: 12 Jun 2007 Posts: 20
|
Posted: Mon Jul 07, 2008 5:33 pm |
yeah, I'm really thank you to both of your advice ![Very Happy](images/smiles/icon_biggrin.gif)
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|