[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 7

 
Roman.:
Tried it... :-))) It's still a habit from Pascal... Readability is worse... Especially for those who aren't too "initiated"... :-))) And you need indentation in operations in nested loops and conditions by tab-width, or 3 spaces - as a last resort... :-))

Readability is worse when the 17 lines of code are spread across the page and there are a lot of extra curly braces. And you need indents where you need them. And my version has them, and everything is in its place...

Everything is IMHO. Everyone has their own style.

 
artmedia70: Have you ever tried writing codes compactly?

Well, that's not necessary. We're not writing on paper, Artyom, there's no need to save money...

I also write it sprawling, but most of the functions still fit on one screen, even if the font is enlarged.

 
artmedia70:

Readability is worse when the 17 lines of code are spread across the page and there are a lot of extra curly braces. And you need indentation where you need it. And you should agree that they are there in my version and everything is in its place...

All in my opinion. Everyone has their own style.

Yes. I agree. There are certain rules there about the order of code... etc. I know.
 
Mathemat:

Well, that's not necessary. We're not writing on paper, Artyom, there's no need to save money...

I also write in a big way, but most of the functions still fit on one screen, even if the font is enlarged.

Yes... Alexey, I can imagine how an 807 line Expert Advisor, which I just gave to my client, would look like if it was written in Roman's style ... :))))
 
artmedia70:
Yeah... Alexey, I can imagine what the 807 line EA I just gave to a customer would look like if it was written in Roman's style ... ))))

Instead of 807 it would be 2807.)) For small projects it is acceptable of course. But if the project is big, the advantage of a compact is obvious.
 
tol64:

... big, then the advantage of the compact is obvious.
:)))))))))))))))) well, yeah... if it's a compact, you don't have to reach for the high-hanging rope... it's all there: you turn around, press a button and... you have to get up in time so the big one doesn't get wet... :))))))))))))
 
Hi guys. I found out that the priority when drawing labels (if background=false) depends on the presence of numbers in the name of the object (!!!). But I don't understand, what it counts in the variable string ? But the intersecting labels are definitely placed one over the other, obeying some kind of law. Does anyone know?
 
Pyro:
Hi guys. I found out that the priority when drawing labels (if background=false) depends on the presence of numbers in the name of the object (!!!). But I don't understand, what does it count in the variable string ? But the intersecting labels are definitely placed one over the other, obeying some kind of law. Does anyone know?

https://www.mql5.com/ru/forum/123941
 
artmedia70:

Compactness makes readability worse. To be fair, Roman's version is not quite good either, even if you ignore the logic.

What's the point of saving lines?

tol64:

But if the project is large, the advantage of the compact is obvious.

Exactly the opposite.

 
Pyro:
Hi guys. I've found that the priority when drawing labels (if background=false) depends on the presence of numbers in the name of the object (!!!).

The numbers in the object name are symbols and are subject to sorting rules like other symbols in the object name.