Help me learn how to program. - page 9

 
Алексей Тарабанов:

Dimitri, this is a specialist of a very high calibre.

Take a nap

 
Nikolay Mitrofanov:

I also don't understand why you write about brevity and beauty of code. Why, why...

I'm writing about the need to look in a textbook first before starting to make code. But you're saying that he can do it anyway and let him make a thousand mistakes instead of taking a look at how it was done before and how it's right to do it now).

There is no difference, the result will be the same - a person will learn to program.

And who are you going to teach programming to?

 
Tio Nisla:

I doubt it was particularly optimised. Otherwise they would have done it that way:

Why is there a uselessly crooked '-1' in variable initialization? It's unnecessary.

Yet another victim of C++. There's a whole club around here somewhere, join us.

 
Tio Nisla:
Above is a link to a primer, in one of my posts look up 'Cycle for'

What a joker you are)))

int OnInit()
{
   for(int i=0;i<somefunc();i++) PrintFormat("array[%d]\n", i);
   return(INIT_SUCCEEDED);
}

int somefunc() {
   static int count = 0;
   PrintFormat("Туточки уже %d-й раз!\n", ++count);
   return 3; // это типа количество чего-то там, элементов массива например
}

It's only natural that the function will call as many times as it needs comparisons with i

The counter confirms it))

You're such a joker. You won't even be able to tell it's a joke.

The question was where does the PositionsTotal() function takes the value for comparison - gets the number each time from the broker or stores it somewhere in the terminal variables and is updated only at opening and closing.

There just doesn't seem to be any more redundancy, if there is any.

 
Dmitry Fedoseev:

And who are you going to teach programming to?

No one.

If you were, you would give me a link to the documentation and the forum thread where the issue in question is being discussed.

 
The idea that the PositionsTotal() function can get a number from a broker every time is brilliant! Only a true genius could come up with such an idea!
 
Nikolay Mitrofanov:

No one.

If you had, you would have given a link to the documentation and the forum thread where the issue in question is discussed.

One page has turned and you have already forgotten what you wrote about.

 
Dmitry Fedoseev:

One page has turned and you have already forgotten what you wrote about.

Why should I remember that I was responding to boorishness and gibberish) I don't understand you at all. Do you actually know how to do anything at all?

I remember that you have a question that 8 years ago has already answered cleverly merged. Like an acrobat - oop la! And you're already a Dartagnan.)

Maybe even then there were no fields in structures like MqlDatetime?

 
Nikolay Mitrofanov:

Why should I remember that I was responding to boorishness and gibberish) I don't understand you at all. Do you actually know how to do anything?

I remember that you have already answered a question 8 years ago and deftly merged. Like an acrobat - oop la! And you're already a Dartagnan.)

Maybe there were no fields in structures like MqlDatetime back then?

At least forget your name, what do I care? And it's not me you were answering))))

 
Dmitry Fedoseev:
The very idea that the PositionsTotal() function can get a number from a broker every time is brilliant! Only a true genius could come up with such an idea!

Yeah. TS.