Errors, bugs, questions - page 1654

 
Alexey Viktorov:
Хочешь сказать при закрытых графиках не скрывается символ?
Alexey Viktorov
:

You mean the symbol is not hidden when the charts are closed?

Yeah. I've run into this kind of thing a few times before.

 
Vitalii Ananev:

Still the error message is correct.

Initially I didn't pay much attention to it, but having come across it again - there are arguments that it's not correct. And here's why: further is conditional code

int f()
{
        while ( true )
        {
//много строк c return, continue, без break
                return 0;
//много строк c return, continue, без break
                return 1;
//много строк c return, continue, без break
        }
        return Random(); //(*) написано по требованию MQL компилятора //строка 61
}

What to put after while(true) {} comes down to this: "We'll never be there anyway... return is needed only formally - for the compiler to say OK... So - let's put a random value there - return Random();".

After some time we make some changes in the code and now we need to add a break inside while
In this case the compiler will say: "OK. There is code after while(true) {}, which means that the 'break' case was already provided for earlier and there must be the same 'break' among this set of lines. All return values were already thought out back then - don't bother!".
And in the end we'll get a random value.

But if there were no string (*) at the beginning, the compiler will say: "Error: No... ...no way... there was no break before and we need to return something deliberate".

It turns out that the (*) string is not only excessive but also increases the probability of hard-to-find errors

 
A100:

Initially I didn't pay much attention to it, but coming across it again - there was an argument that it wasn't right...

Moreover, in this example of yours, you should normally get an "unreachable code" warning. Studio doesn't give that warning either, but the Bordeaux compiler did, I remember.
 
Sergei Vladimirov:
What's more, in this example of yours, you should normally generate an "unreachable code" warning. Studio doesn't give out such a warning either, but the Borland compiler did, as I recall.

Good memory.

And Borland does not give out warnings on trifles which once again proves my arguments

 
A100:

And Borland doesn't give warnings for nothing...

I don't agree with you there. :) It seems to me that it is a trifle unworthy of attention. You just plug return(0) and get on with it.

Besides, in MCL you'd better always use while(!IsStopped()) instead of while(true), in which case return after the loop is already mandatory.

 
Does anyone else have problems with cloud (and not only) optimisation or is it just my "luck" that it stopped working with the new MT5 build?
 
In my editor, the list of available methods doesn't drop down after the point. This is very inconvenient for me. How can I fix it? On the old version, the list did drop down.
 
vinnipyx:
In my editor, the list of available methods doesn't drop down after the point. It's very inconvenient for me. How can I fix it? On the old version, it did drop down.
Same problem. I have to start typing from memory, and after a couple of letters it falls out, but only beginning with these letters.
This is awfully inconvenient.
 

How about this

 
Vladimir Pastushak:

How about this

maybe it's a structure constructor? it's there anyway