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
Lyriikka
Beginner


Joined: 02 Oct 2002
Posts: 21
Location: Finland

PostPosted: Fri Oct 25, 2002 3:12 pm   

to make variables equal in length
 
Whats the best way to add blank spaces into a variable to make them equal in lenght?

Normally:
#show @one |
#show @two |
jing |
jingjang |

I want:
#show @one |
#show @two |
jing |
jingjang |

Is there better(=faster/easyer) way than %repeat( %char( 32), %eval( 11-%len( @one))) to do this?


Lyriikka the GenTnLadyLover
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Fri Oct 25, 2002 3:27 pm   
 
If you just want it to display lined up, then your looking for the %format command.

#sh %format(&10s,@one)
#sh %format(&10s,@two)



Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.34
Zmapper Version 1.10
Reply with quote
Lyriikka
Beginner


Joined: 02 Oct 2002
Posts: 21
Location: Finland

PostPosted: Sun Oct 27, 2002 8:53 pm   
 
Thanks! After little tweaking that works great.

Lyriikka the GenTnLadyLover
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