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
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Tue Nov 05, 2002 1:18 am   

Showing Keys and Values
 
Ok I'd like to do something like
SAYID
and do Say (All of the Keys in the Variable item with a - then all of the values for the keys followed by a comma or something :)
---I do NOT Know what keys are in the Variable ..it varys--
--Thanks In ADVANCE--
-W95-
Zmud 616
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Tue Nov 05, 2002 2:36 am   
 
#AL SAYID {#LOOPDB @db {#SAY %key - %val,}}

would give you columnar output, but if you want them all on one or line:

#AL SAYID {#VAR output ""; #LOOPDB @db {#VAR output %concat(@output, %key, " - ", %val, ", ")}; #VAR output %concat(%leftback(@output,2),"."); #SAY @output}

where @db is the variable in both cases.

Troubadour
(Win 98, Pentium III, 550 MHz)
Reply with quote
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Tue Nov 05, 2002 2:51 am   
 
Thanks..Works great..although you should toss this onto your alias so it doesnt add onto itself everytime you run it..#var output {} {_nodef}
Reply with quote
rwfrk
Wanderer


Joined: 26 Feb 2002
Posts: 81
Location: USA

PostPosted: Tue Nov 05, 2002 3:01 am   
 
Thanks..Works great..although you should toss this onto your alias so it doesnt add onto itself everytime you run it..#var output {} {_nodef}..
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