Scheduled maintenance alert

Our website will undergo maintenance from Di, 19.11.2024, 20:00 CEST to Di, 19.11.2024, 22:00 CEST, which may cause occasional service disruptions. We apologize for any inconvenience and appreciate your understanding.

Content

Page tree

Usage notes:

  • Certain formulation can cause unexpected behaviour. As examples: division by zero division by negative number, example: 48/-7 using text or char except for callback for operand using another operator (<, >, =,etc)

  • Supported operators: +, -, *, /
  • Arguments can't start and end with operator (+, -, *, / )
  • Two operators one after the other will cause an error
  • The priority for operator is still working, which mean that the multiplication and division will be executed first followed by addition and substraction
    • Parentheses ((, )) can't be used to change operator priority.
  • Integer division method will be used for division.
  • Callback don't work with float numbers


Here are some common operations:

ArgumentResult
44
1+23
1-2-1
$(max_registrations)-111 (note: can vary depending on phone type)
2*36
0*40
4/22
10/33
47/76
0/40
1+3*413
1-10/5-1
109/10/42


Example code:

<SnomIPPhoneText>
    <Text>
	4=$(math_eval:4)<br />
	1+2=$(math_eval:1+2)<br />
	1-2=$(math_eval:1-2)<br />
	max_registrations-1=$(math_eval:$(max_registrations)-1)<br />
	2*3=$(math_eval:2*3)<br />
	0*4=$(math_eval:0*4)<br />
	4/2=$(math_eval:4/2)<br />
	10/3=$(math_eval:10/3)<br />
	47/7=$(math_eval:47/7)<br />
	0/4=$(math_eval:0/4)<br />
	1+3*4=$(math_eval:1+3*4)<br />
	1-10/5=$(math_eval:1-10/5)<br />
	109/10/4=$(math_eval:109/10/4)<br />
    </Text>
</SnomIPPhoneText>


Result: