[asterisk-bugs] [Asterisk 0015025]: [patch] Functions INC and DEC

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 1 15:34:27 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15025 
====================================================================== 
Reported By:                greenfieldtech
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15025
Category:                   Functions/func_math
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 191919M 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-05-03 20:30 CDT
Last Modified:              2009-06-01 15:34 CDT
====================================================================== 
Summary:                    [patch] Functions INC and DEC
Description: 
Over the course of time, developing Asterisk dialplans becomes fairly
cumbersome, especially when writing While() loops in the dialplan. Mainly,
when we want to iterate a few times, the ever annoying Set(Var=$[${Var} +
1]) is really annoying.
INCrement and DECrement follow the old PASCAL functions, allowing to
increment and decrement a variable.

The functions are built to handle both numeric and alpha-numeric values.
If an alpha-numeric value is given, the functions will simply bail out and
issue a LOG_NOTICE accordingly.

In order to implement this, i've added some functionality to func_math.c
and added a new ast_is_numeric function to strings.h

Please find attached patches for TRUNK.
====================================================================== 

---------------------------------------------------------------------- 
 (0105866) svnbot (reporter) - 2009-06-01 15:34
 https://issues.asterisk.org/view.php?id=15025#c105866 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 198726

_U  branches/1.6.2/

------------------------------------------------------------------------
r198726 | tilghman | 2009-06-01 15:34:26 -0500 (Mon, 01 Jun 2009) | 14
lines

Blocked revisions 198725 via svnmerge

........
  r198725 | tilghman | 2009-06-01 15:33:50 -0500 (Mon, 01 Jun 2009) | 8
lines
  
  Add INCrement and DECrement functions
  (closes issue https://issues.asterisk.org/view.php?id=15025)
   Reported by: greenfieldtech
   Patches: 
         func_math.c.patch_v4 uploaded by greenfieldtech (license 369)
         slightly modified by me
   Tested by: greenfieldtech, lmadsen
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=198726 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-01 15:34 svnbot         Checkin                                      
2009-06-01 15:34 svnbot         Note Added: 0105866                          
======================================================================




More information about the asterisk-bugs mailing list