Errors, bugs, questions - page 2338

 
pavlick_:

There seems to have been a recent change in behaviour. A while ago, the order was different - global variables and statics were initialised in the same order (in declaration order). I.e. in this case first a and then b. Could be wrong, but unlikely.

Before writing this - I wasn't lazy - I checked in MetaTrader 4 build 765x32 (MetaEditor build 1035x32) - everything is the same. And this is 2014 (!)
 
#define  M (a ? 1 : 0)

struct S {
   int a;
};

void OnStart()
{
   S s;
#define  a s.a
   Alert(M);
}

Can't compile, errors:
'a' - too complex, simplify the macro temp.mq5 24 10
's' - struct member undefined temp.mq5 24 10
...

I.e. the preprocessor seems to be trying to recursively expand a.

 

I wonder if it's the broker doing this or a bug in mt 4?


 
A100:
Before writing this - I wasn't lazy - I checked in MetaTrader 4 build 765x32 (MetaEditor build 1035x32) - everything is the same. And this is 2014 (!)

Yes, I was wrong again.

 
Vladimir Pastushak:

I wonder if this is the broker doing this or some bug in mt 4?

Register a real signal on it, if it goes through then it's a DC. There are cent accounts that are displayed as normal (which many signalers use), but you have a cooler option ))).

 

Started running a lot of cross-platform code on MT4. Is there no debugger there? Running it on F5, but it's not slowing down anywhere.

So far I have to do debugging under 5, which is crutchy in some cases.

 

fxsaber: Стал много запускать кроссплатформенный код на MT4. Там отладчика что ли нет? Запускаю по F5, но нигде не тормозится.Пока приходится отладкой заниматься под пятеркой, что костыльно в некоторых случаях.

the breakpoint in MT4 is exactly triggered, on the left side of the field in the meta-editor click


 
Igor Makanu:

the breakpoint in MT4 works exactly, on the left field in the meta-editor click

Run.

 
fxsaber:

Run.

I checked, yes you are right - breakpoint does not work in MT4 when testing on historical data, I checked on standard Moving Average EA - it does not work!

ZZY: I tried adding DebugBreak() to the code - no result, still cannot stop the test and exit to the debugger

ZZZY: A breakpoint when testing on real data, works

 
Igor Makanu:

ZZZY: breakpoint when testing on real data, works

Mine doesn't work on real data either.