Questions about MQL4. - page 9

 
int start() { double a=1; if (a>3 && fun_1()==1)Alert("Всех расстрелять 2 раза"); Alert("Все живы?"); return; } //+------------------------------------------------------------------+ int fun_1() { Alert("Всех расстрелять 1 раз"); return(0); }

Shall we live or shall we not live? Here's the question :)
Should control be passed to the Alert("All alive") string when the if statement finds out that a is not greater than 3 ?
 
And why not. Just one thing - after the "Everyone shoot 1 time" Alert comes out, the appearance of the "Everyone alive?" Alert is a bit tragic :)
 
This is exactly what I'm talking about.
My understanding is that control should be passed to 'life' somewhere between && and fun, i.e. as soon as if realises there is an 'and'.
 
This has been written about more than once - there is a full check in progress, which means that once you get the falsa, the second part will also be checked.
 
Rosh, OK, thank you. That's good to know.
 
stringo:
SKif:
Is there any way to know window size in pixels?
Theoretically, yes. Using WindowHandle(Symbol(),Period()) function, take the handle of the current window and give this handle to your dll which can find out the window size, e.g. using GetClientRect function
Suppose, I have 3 windows with the same Symbol() and Period().
How can I get the Handle of each of these three windows?
 
Rosh:
This has been written about more than once - there is a full check, i.e. once you get the fals, the second part will be checked as well.
Is the order of calculating subexpressions specified somehow?
Including for less trivial cases where && and || are mixed up and/or brackets are used?
 
I can't say, just in case, I'm defining this order myself with brackets in the right places - my memory is bad, it's easier that way :)
 
komposter >> :
Why between ticks? Why depend on them at all?
It's kinda complicated, I won't get into it....You'll figure it out ;)

Hey, buddy.

do me a favor.

Tell me how I can move the hand from a bigger timeframe to a smaller one.

>> let's say from an hour to 15 minutes.

>> thank you

Reason: