#2 Extend incr(), decr()

closed
Perry
None
5
2005-01-08
2003-09-15
Anonymous
No

I suggest we extend the incr() and decr() functions to
take an optional second argument specifying the amount
by which to increment (defaulting, as now, to "one" if
left unspecified)?

In other words,
incr( x, amt)
would be semantically equivalent to
set( x, add( x, amt) )
which idiom I find myself very frequently using.

Thanks,

-- WEB

Discussion

  • Perry
    Perry
    2003-11-27

    • assigned_to: nobody --> puddle
     
  • Perry
    Perry
    2003-11-27

    Logged In: YES
    user_id=60964

    Implemented in cvs trunk

    ***************

    Checking in ChangeLog;
    /cvsroot/lifelines/lifelines/ChangeLog,v <-- ChangeLog
    new revision: 1.1140; previous revision: 1.1139
    done
    Checking in NEWS;
    /cvsroot/lifelines/lifelines/NEWS,v <-- NEWS
    new revision: 1.67; previous revision: 1.66
    done
    Checking in src/interp/builtin.c;
    /cvsroot/lifelines/lifelines/src/interp/builtin.c,v <--
    builtin.c
    new revision: 1.147; previous revision: 1.146
    done
    Checking in src/interp/functab.c;
    /cvsroot/lifelines/lifelines/src/interp/functab.c,v <--
    functab.c
    new revision: 1.32; previous revision: 1.31
    done

     
  • Perry
    Perry
    2005-01-08

    Logged In: YES
    user_id=60964

    Closing as new release 3.0.39 is now available.

     
  • Perry
    Perry
    2005-01-08

    • status: open --> closed