Skip to content

MATH()

Synopsis

Performs Mathematical Functions.

Description

Performs mathematical functions based on two parameters and an operator. The returned value type is type

Example: Sets var i to 11
same => n,Set(i=${MATH(123%16,int)})

Syntax

MATH(expression,type)
Arguments
  • expression - Is of the form: number1__op__number2 where the possible values for op are:
    +,-,/,*,%,<<,>>,^,AND,OR,XOR,<,>,<=,>=,== (and behave as their C equivalents)

  • type - Wanted type of result:
    f, float - float(default)
    i, int - integer
    h, hex - hex
    c, char - char

Generated Version

This documentation was generated from Asterisk branch 22 using version GIT