Features of the mql5 language, subtleties and tricks - page 123

 
fxsaber:

Especially when the code is big and not your own.

That's true. Many coders here don't work with other people's code and I understand them. Now you need reverse sorting of multidimensional arrays, or select byte ticket of closed orders in history)))))

 
Well, anything can be mixed up, e.g. a minus instead of a plus, etc. This is purely on the programmer's conscience, the computer is not a telepath. Another thing is when the array cannot be expanded due to lack of memory in the system - this is a technical problem.
 
Alexey Navoykov:
Well, anything can be mixed up, e.g. a minus instead of a plus, etc. This is purely on the programmer's conscience, the computer is not a telepath. Another thing is when the array cannot be expanded due to lack of memory in the system - this is a technical problem.

For the real world, I use this scheme.

 
fxsaber:

For real life, I use a scheme like this.

I don't get it, why call it an ARRAYRESIZE class? Why not just ARRAY, if it has copying methods, although it's all mixed up...
 
Alexey Navoykov:
I don't quite understand why we should call it all ARRAYRESIZE class, why not just ARRAY, if it contains methods of copying, although everything is mixed up there...

It's not about the name. The goal was to output as much information as possible at the moment when the resize/copy is broken. Because the next step is to try to write an item that doesn't exist. Which entails out of size with a silent shutdown of the combat advisor.

 
Has anyone tested the performance of ArraySwap? Is it really just the array pointers that change?
 
fxsaber2019.01.17 13:05 RU
Artyom Trishkin:

Sometimes it's much easier to take apart an understandable scribble than to start taking apart a compact puzzle and immediately abandon the futile exercise.

The jigsaw isn't much bigger in size than a jumble of macros.

 

Somebody might be interested in the ArrayInstert test, to check if the function works correctly

Files:
ArrayInsert.mq5  50 kb
 

Please don't litter the topic - it's about features, not about how ugly and ugly everything is.

You found a feature - you solved it - you shared it - people are grateful.

Please put your opinions on squalor and underdevelopment into the interesting and humorous section.

 
Artyom Trishkin:

Please don't litter the topic - it's about features, not about how ugly and ugly everything is.

You found a feature - you solved it - you shared it - people are grateful.

Please put your opinions on squalor and underdevelopment into the interesting and humorous section.

OK, I apologise if my wording sounded rude. I didn't mean mean mean mean. I meant underdevelopment in the literal sense - lack of some functionality, such as multiple interfaces, which the developers have been promising for several years.
Reason: