|
Palmer Novice
Joined: 21 Mar 2003 Posts: 38 Location: USA
|
Posted: 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?
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
|
|