Wrong error line.

 

Where do I file a bug report. Metalang.exe and MetaEditor.exe sometimes moves the error line. I prepare an example on when this happens.


#property library

#define NSECTIONS 4

string A[NSECTIONS] = {"A","B","C","D"};

int du my; // Error shows on correct line.


string B[NSECTIONS] = {
"A",
"B",
"C",
"D"
};

int du my; // Error should be here.




// Instead it Shows here


void dummyFun() {
}


Compile it as a library as you will see.

It seem to be a problem with the compiler and string arrays.

Windows 7 x64

Metalang.exe v 4.0 build 226


[EDIT]

A work around is to place string arrays on an include file.


[EDIT]

It seem that the problem is with any constant array and not just arrays of strings:

#property library

#define NSECTIONS 4

int A[NSECTIONS] = {0,1,2,3};

int du my; // Error shows on correct line.


int B[NSECTIONS] = {
0,
1,
2,
3
};

int du my; // Error should be here.




// Instead it Shows here


void dummyFun() {
}

Has the same problem.
 

I confirm your code gives me the same inappropriate line and location for the second error.

Win7 x64 with build 225.

 
xanatose:

Where do I file a bug report.

Send a message to one of the moderators (for example - Rosh), although I am sure MQ is aware of this bug (it's really old and has been reported many times in the forum).

 

MT4 reports many errors below, sometimes way below or at the end, from where the error is. Try adding an extra open brace somewhere.

And next time

Reason: