Persistence quality issue in standard library - page 2

 

Fixed. Please, try this.

 

Files:
ArrayObj.mqh  32 kb
 

CArrayDouble::DeleteRange(int from, int to)

when pass in from==to, it does not delete.

Example, CArrayDouble a; a.Add(1); a.Add(2);

when calling DeleteRange(1,1), it does not delete item 2.  Please check other similar arrays.

 
williamwong:

CArrayDouble::DeleteRange(int from, int to)

when pass in from==to, it does not delete.

Example, CArrayDouble a; a.Add(1); a.Add(2);

when calling DeleteRange(1,1), it does not delete item 2.  Please check other similar arrays.

Fixed.
Files:
ArrayDouble.mqh  32 kb
 

Can someone explain what is Shift method in CArrayInt used for?

assume, 0,1,2,3

when I apply Shift(0,3), it returns 1,2,3,0.  It looks like rotation of elements within an array.

If I want to rotate the other direction, 3,0,1,2:

I tried Shift(3,-3) , it returns 3,1,2,2,3,0.

Is this a bug?

Please check all other similar arrays as well. 

Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
 
williamwong:

Can someone explain what is Shift method in CArrayInt used for?

assume, 0,1,2,3

when I apply Shift(0,3), it returns 1,2,3,0.  It looks like rotation of elements within an array.

If I want to rotate the other direction, 3,0,1,2:

I tried Shift(3,-3) , it returns 3,1,2,2,3,0.

Is this a bug?

Please check all other similar arrays as well. 

So anyone from Metaquotes, is this a bug?
 
williamwong:
So anyone from Metaquotes, is this a bug?
Solved in build 360.
Reason: