That's the style! :) - page 2

 
ForexTools >> :

Thanks TheXpert, I somehow didn't even notice this "passage"

well, don't pull the excuse that it was somehow done and now you have to at least explain it ;)

The design elements are comentaries, you can remove them without any loss of functionality!!! Try to remove just one such "element" (I mean } ) - where will the compiler send you? :))))

Welcome to MQL5.com!

 

What are you talking about, if you don't like it, let them do it their own way, I, for example, have always struggled with the old formatting and

I've always struggled with old formatting, and I've always used this style:

if( условие)
  { оператор;
   if( условие)
     {if( условие)
        { оператор;if( условие) оператор;  
        }
      оператор;
     }
  }

and now that the formatting is getting closer to normal, I have to take your interests into account,

no, now the truck with the candy has overturned on my street :o)

zy but if it were possible to configure the styler as there is an opportunity to customize templates, it would be great.

 
What's there to talk about. The styler is disappointing, you can't set it up - and that's probably the main disappointment.
 

Wow!!!

Looked closely, and the Styler5 code matches my style exactly

A fragment of my code from the indicator posted in this thread

       if( trend==1)              //первая ситуация когда последним на графике отобразили минимум
         {
          if(High[ i]>= lokal_max)
            {
             lokal_max=High[ i];
             t_max=Time[ i];
             lokal_min= lokal_max;
             t_min= t_max;
            }
          else if(Low[ i]<= lokal_min)
            {
             lokal_min=Low[ i];
             t_min=Time[ i];
            }
          if( lokal_max- lokal_min>= vistup*Point)
            {
             max[iBarShift(NULL, 0, t_max, true)]= lokal_max;
             if( pokaz_urov_vistupa)
               por[ i]= lokal_max- vistup*Point;
             last_max= lokal_max;
             shagi[ i]=( last_max- last_min)/Point;
             vsego_up++;
             summa_up= summa_up+ shagi[ i];
             if( max_up< shagi[ i])
               {
                max_up= shagi[ i];
                time_max= t_max;
               }
             kommentariy=TRUE;
             n= i;
             trend=-1;
             lokal_max= lokal_min;
             t_max= t_min;
            }
         }

And this is the code style I was taught at LETI at the computer engineering and informatics department, we studied C++ there.

So maybe it's some kind of standard.

 
Urain >> :

And now that formatting is getting close to normal, it has to take your interests into account,

no now there's a kamazza with candy in my street :o)

Believe me, your style is NOT normal.

ALEX_SPB_RU wrote(a) >>

And this style of code was taught to me at LETI in the computer engineering and informatics department, where we studied C++.

So it may be some kind of standard.

Similarly.

>> :

Welcome to MQL5.com!

Are you suggesting we continue the conversation there? >> OK, I'll start a thread.

 
TheXpert >> :

Believe me, your style is NOT normal.

Similarly.

And a lot of people talk about this style too:

if(условие){
  оператор;
  if(условие){
    оператор;
    }
  }

For me personally, the essence of the code is completely lost, I just can't see it.

if( условие)
{ оператор;
 if( условие)
 { оператор;
 }
}

или этот вооще отпад:

if ( условие)
{ оператор;
 if ( условие)
 { оператор;
 }
}
 
Urain >> :

And a lot of people talk about this style too:

There was a thread about coding styles. I have spoken there in detail, including the style you cited.

 

In general, it would be ideal to make the style customizable, so that everyone can adjust it for themselves.

That's just do not know with someone else's code such as Urain opened in my editor is configured under my style will be displayed in my style or in his? It would be ideal to be converted into my style!!!

 
TheXpert >> :

There was a thread about coding styles. I've talked about it in detail, including the style you cited.

I do not really care what you say about my style, as well as I think you do not care what I think about yours, the point is that it used to be formatted so badly for me now so badly for you. Hence the moral of making Styler customizable.

 
Urain >> :

And a lot of people talk about this style too:

for me personally, the essence of the code is completely lost, I just can't see it.



I would rewrite the first example a little differently - it's close to what I actually use:

if(условие) {
  оператор;

  if(условие) {
    оператор;
  }
}


Agree - a few spaces and hyphenation - and everything already looks a lot clearer. :)

The main thing is that you can immediately see the level of nesting of the code blocks.