Math( )


Math( ) Performs mathematical operations and returns the result

 Math(   returnvar   ,   number1 operator number2   ) 

Performs a floating-point calculation on number1 to number2 , and assigns the result to the variable named returnvar . Valid operators are + , - , / , * , % , < , > , >= , <= , and == , and they behave as their C equivalents.

Always returns .

 ; add two numbers, and say the result  exten => 123,1,Math(SUM,2+2)  exten => 123,2,SayNumber(${SUM})     ; subtract two numbers, and say the difference  exten => 124,1,Math(DIFFERENCE,5-3)  exten => 124,2,SayNumber(${DIFFERENCE}) 



Asterisk. The Future of Telephony
Asterisk: The Future of Telephony: The Future of Telephony
ISBN: B0026OR3OO
EAN: N/A
Year: 2001
Pages: 380

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net