[Asterisk-cvs] asterisk/doc README.math,1.1,1.2
markster at lists.digium.com
markster at lists.digium.com
Sun Oct 3 10:20:17 CDT 2004
Update of /usr/cvsroot/asterisk/doc
In directory mongoose.digium.com:/tmp/cvs-serv21951/doc
Modified Files:
README.math
Log Message:
Update documentation
Index: README.math
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/README.math,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- README.math 3 Oct 2004 14:19:31 -0000 1.1
+++ README.math 3 Oct 2004 14:22:01 -0000 1.2
@@ -10,7 +10,7 @@
All functions follow the same basic pattern for parameters:
parameter 1 = the name of the return variable
-parameter 2 = the first number
+parameter 2 = the operation
parameter 3 = the second number
Each action is perfromed as
@@ -30,41 +30,31 @@
Example dialplan:
-exten => 11099,1,SUM(RV,1,20)
+exten => 11099,1,Math(RV,1+20)
exten => 11099,2,NOOP(${RV})
-exten => 11099,3,MULTIPLY(RV,10,2)
+exten => 11099,3,Math(RV,10*2)
exten => 11099,4,NOOP(${RV})
-exten => 11099,5,DIVIDE(RV,10,2)
+exten => 11099,5,Math(RV,10*2)
exten => 11099,6,NOOP(${RV})
-exten => 11099,7,SUBTRACT(RV,10,2)
+exten => 11099,7,Math(RV,10-2)
exten => 11099,8,NOOP(${RV})
-exten => 11099,9,MODULUS(RV,2,10)
+exten => 11099,9,Math(RV,2%10)
exten => 11099,10,NOOP(${RV})
-exten => 11099,11,DIVIDE(RV,10,0)
+exten => 11099,11,Math(RV,10/0)
exten => 11099,12,NOOP(${RV})
-exten => 11099,13,SUBTRACT(RV,10,200)
+exten => 11099,13,math(RV,10-200)
exten => 11099,14,NOOP(${RV})
-exten => 11099,15,DIVIDE(RV,1,20)
+exten => 11099,15,Math(RV,1-20)
exten => 11099,16,NOOP(${RV})
-exten => 11099,17,LT(RV,1,20)
+exten => 11099,17,Math(RV,1<20)
exten => 11099,18,NOOP(${RV})
-exten => 11099,19,GTE(RV,1,20)
+exten => 11099,19,Math(RV,1>=20)
exten => 11099,20,NOOP(${RV})
-exten => 11099,21,GT(RV,101,20)
+exten => 11099,21,Math(RV,101>20)
exten => 11099,22,NOOP(${RV})
-exten => 11099,23,EQ(RV,1,20)
+exten => 11099,23,Math(RV,1==20)
exten => 11099,24,NOOP(${RV})
-exten => 11099,25,LTE(RV,20,20)
+exten => 11099,25,Math(RV,20<=20)
exten => 11099,26,NOOP(${RV})
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Makefile stuff:
-
-
-APPS+=app_math.so
-
-
-app_math.so: app_math.c
- $(CC) -D_GNU_SOURCE -shared -Xlinker -x -o $@ $< -lz -L/usr/lib
-
More information about the svn-commits
mailing list