Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
thegto
Beginner


Joined: 12 Jun 2007
Posts: 20

PostPosted: 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
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Jul 07, 2008 5:23 am   
 
I believe you're looking for the %format function.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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")|
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
thegto
Beginner


Joined: 12 Jun 2007
Posts: 20

PostPosted: Mon Jul 07, 2008 5:33 pm   
 
yeah, I'm really thank you to both of your advice Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net