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
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Mon Dec 15, 2003 5:14 am   

Expanding a DB variable
 
Is there any way, when expanding a DB variable to either A) Display the value THEN the key, or B) align the values into a neat column, for example:

A) Display the value then the key:

[value1] Key1
[value2] Key2
[value3] key3
et cetera...

B} align the values into a column:

Key1---------[value1]
Longerkey2---[value2]
3-------------[value3]
et cetera... (only, without the dashes which were added so they would line up in the forum)

And if possible, as I have shown, I would like the value to be displayed inside of brackets. I've been fiddling with %expanddb and searching the help files and related commands, but I can't figure out a way to do either
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Dec 15, 2003 7:58 am   
 
Write your own display routine with #LOOPDB.
A) Put %val first and %key second
B) Use %len() to determine the length of each key and %repeat() to add however many spaces are needed before the value. Or, use %format(). Or, use some other formatting method that you think up.
Reply with quote
Latent
Apprentice


Joined: 19 Aug 2002
Posts: 120
Location: USA

PostPosted: Mon Dec 15, 2003 8:35 am   
 
Great, I'll try to work something out, thanks for the help LightBulb

It worked great, with those commands I was able to do everything I wanted and more, thanks for pointing me in the right direction =)
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