[asterisk-users] MSet()
Philipp Kempgen
philipp.kempgen at amooma.de
Sat Dec 13 02:32:01 CST 2008
Anthony Messina schrieb:
> On Friday 12 December 2008 15:41:54 Mark Michelson wrote:
>> would result in a variable called FOO being set to the value
>> "hello,BAR=world". The MSet application was added to facilitate being able
>> to set multiple variables in a single application call. If using MSet, the
>> above would instead result in a variable called FOO being set to the value
>> "hello" and a variable called BAR being set to "world".
>
> what about Set(ARRAY(var1,var2)=value1,value2) ?
>
> is the MSet() app a better/quicker way to do this?
Just a word of warning:
1.4: Set(ARRAY(var1|var2)=val1\,val2)
or: Set(ARRAY(var1,var2)=val1\,val2)
1.6: Set(ARRAY(var1,var2)=val1,val2) ?
At least in 1.4 the "," has to be escaped because otherwise you'd
have a second argument to Set().
I still think that a plain
Set(var1=val1);
Set(var2=val2);
is the most portable way which is least likely to cause any
problems.
portable => better
Maybe not quicker. (Didn't do any benchmarks.)
But certainly easier to read/write/maintain.
Philipp Kempgen
--
http://www.das-asterisk-buch.de - http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
--
More information about the asterisk-users
mailing list