[asterisk-dev] European Asterisk Developer's Meet-Up: Last Call

Nir Simionovich nir.simionovich at gmail.com
Wed Apr 29 06:50:43 CDT 2009


Benny Amorsen wrote:
> Matthew Nicholson <mnicholson at digium.com> writes:
> 
>> Also I think there should be an optional argument for how much to
>> inc/dec (${INC(VAR,2)}).
> 
> That syntax looks like you're using it as a function, not as an
> application. Does the function as written increase the value of VAR as a
> side effect, or does it just return the value of VAR + 2? Does it
> preincrement or postincrement?
> 
> If this ends up being implemented, please just make it an application
> with the syntax INC(VAR,2), and don't let it return anything.
> 
> The only reason why this application has any use is that Asterisk's use
> of brackets is so funky that they're really hard to get right. If you
> could do:
> 
>  exten => _X,n,Set VAR = VAR + 1
> 
> instead of
> 
>  exten => _X,n,Set(VAR=$[${VAR}+1])
> 
> This would be much less of a problem.
> 
> By the way, I only just realized that Asterisk has a SET function. What
> does it return?
> 
> 
> /Benny
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
Actually,

   It should be an application, as it's not support to return anything, 
just incerement or decrement the variable.

-- 
Kind Regards,
   Nir Simionovich
   Asterisk Community Founder and Maintainer - Israel

   (e) nir.simionovich at gmail.com
   (w) http://www.simionovich.com




More information about the asterisk-dev mailing list