#2 Extend incr(), decr()

closed
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

  • Anonymous - 2003-11-27
    • assigned_to: nobody --> puddle
     
  • Anonymous - 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

     
  • Anonymous - 2005-01-08

    Logged In: YES
    user_id=60964

    Closing as new release 3.0.39 is now available.

     
  • Anonymous - 2005-01-08
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks