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
Palmer
Novice


Joined: 21 Mar 2003
Posts: 38
Location: USA

PostPosted: Mon Mar 24, 2003 2:38 am   

Concatenate string lists?
 
The answer to this seems may be implicit in the help files, but I want to make sure. Can I concatenate string lists, or should I instead %expand them and concatenate them as strings, or add one item at a time from one list to the other list?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Mar 24, 2003 3:32 am   
 
#VARIABLE alist "a|b|c"
#VARIBALE blist "d|e|f"

#VARIABLE clist %concat(@alist,"|",@blist)
a|b|c|d|e|f

Note you can nest lists if you wish
#ADDITEM dlist @alist
#ADDITEM dlist @blist
(a|b|c)|(d|e|f)



Ton Diening
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 24, 2003 8:43 am   
 
You can also concatenate directly (without the function)
#VARIABLE alist "a|b|c"
#VARIBALE blist "d|e|f"

#VAR dlist {@alist|@blist}
a|b|c|d|e|f

But don't forget the | or you'll get
a|b|cd|e|f

LightBulb
Advanced Member
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