Project

General

Profile

Feature #518

incr/decr functions: to be used in packages

Added by Anna Maria Bigatti about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Cleaning
Target version:
Start date:
03 Apr 2014
Due date:
% Done:

100%

Estimated time:
1.50 h
Spent time:

Description

use incr when possible in packages


Related issues

Related to CoCoA-5 - Design #364: Incr command/functionClosed2013-06-03

Related to CoCoA-5 - Feature #504: New operators: += -= *= /=In Progress2014-04-02

Related to CoCoA-5 - Slug #1275: incr and decr are slowNew2019-04-29

History

#1 Updated by John Abbott about 10 years ago

Wouldn't it be better to wait for the outcome of #504 before changing the packages?

#2 Updated by Anna Maria Bigatti about 10 years ago

John Abbott wrote:

Wouldn't it be better to wait for the outcome of #504 before changing the packages?

John Abbott wrote: #364

Using fgrep "+1;" *.cpkg5 produced about 30 lines which could be modified to use incr or decr.
Let's try in one file, and compare before and after to see what we think.

Let's try them both in one file... ;-)

#3 Updated by John Abbott about 10 years ago

"incr" is most used in list.cpkg5 for QuickSort1 and QuickSortBy1.

Anyway, you're right that we can assess how the code looks without actually having to implement += operator.

#4 Updated by John Abbott about 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.1.1 Seoul14

#5 Updated by Anna Maria Bigatti almost 10 years ago

  • Assignee set to Anna Maria Bigatti
  • % Done changed from 0 to 20

John Abbott wrote:

"incr" is most used in list.cpkg5 for QuickSort1 and QuickSortBy1.

I updated the code and it works fine.
I think it is a good thing because it "reads well".

I also changed the Swap code and actually used the new swap function. Readablility++!

#6 Updated by Anna Maria Bigatti almost 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 20 to 90

All done (I think).
If/when we make += it'll be easy to search for incr/decr

#7 Updated by Anna Maria Bigatti over 9 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

#8 Updated by Anna Maria Bigatti over 9 years ago

  • Subject changed from incr function: to be used in packages to incr/decr functions: to be used in packages

#9 Updated by John Abbott almost 5 years ago

  • Related to Slug #1275: incr and decr are slow added

Also available in: Atom PDF