Errors, bugs, questions - page 2895 1...288828892890289128922893289428952896289728982899290029012902...3193 New comment Igor Makanu 2020.10.30 13:09 #28941 A100: A compilation error: used to work, but at the beginning of the year they broke the function pointers, it seems your code should still work in MT4 it will work: typedef void (*fn)(); void f() {} fn g() { return f; } void OnStart() { fn func = g(); func(); } i.e. now you have to use a temporary variable ( now you can't even use an array of pointers!!!! ) A100: There is some contradiction here because What is thedifference in principle? One of the admins wrote a long time ago how the parsing is done, first static variables, then globally described, then the body of the function, parsing from top to bottom in the text ... but that's not accurate ;) Pointers to Functions Single array calculation during Suggestions for MQL syntax A100 2020.10.30 13:23 #28942 Igor Makanu: i.e. now you have to use a temporary variable ( now you can't even use the pointer array!!!! ) That's why I wrote it, so that Developers could do without the temporary Igor Makanu 2020.10.30 13:30 #28943 A100:That's why I wrote, so that if possible, the Developers could do it without the temporary @fxsaber wrote as soon as they found it, probably a year has passed, well, maybe you will be heard A100 2020.10.30 13:43 #28944 Igor Makanu: i.e. now you have to use a temporary variable ( now you can't even use the pointer array!!!! ) Do you have an example to prove that you can't? Igor Makanu 2020.10.30 13:52 #28945 A100:Do you have an example to prove that you can't? wrote an example: typedef void (*fn)(); void f() {} fn g() { return f; } void OnStart() { // fn ptr[10]; //possible use of uninitialized variable 'ptr' fn ptr[10] = {0}; // OK for(int i = ArraySize(ptr) - 1; i >= 0; i--) ptr[i] = g(); // for(int i = ArraySize(ptr) - 1; i >= 0; i--) ptr[i](); //')' - expression expected for(int i = ArraySize(ptr) - 1; i >= 0; i--) // OK { fn func = ptr[i]; func(); } } I was surprised, for some reason it generates a warning fn ptr[10]; //possible use of uninitialized variable 'ptr' now I need to figure out how to initialize pointers to functions used to be possible in MQL5: ptr[i](); On while statement a possible use of uninitialized Warning: "possible use of A100 2020.10.30 14:21 #28946 Igor Makanu: You could use in MQL5: ptr[i]() before; Yes... I remember Forum on trading, automated trading systems & strategy testing Bugs, bugs, questions A100, 2020.07.23 02:40 Error during compilation typedef void (*fn)(); void OnStart() { fn ff[ 1 ]; ff[ 0 ](); //Error:: ')' - expression expected } I had a bug in last year's build, it all compiled and worked fine. Forum for trading, automated trading systems & strategy testing Bugs, bugs, questions A100, 2020.07.23 16:31 I drew build 2085x32 from old stock - it all compiles well - you can try it yourself New MetaTrader 5 Platform Features of the mql5 Libraries: Expert A100 2020.10.30 19:23 #28947 It's a compilation error: class EventChartCustom { EventChartCustom() {} }; bool f() { return (EventChartCustom( 0, 0, 0, 0, NULL ) ? true : false); //(1) Error: 'EventChartCustom' - wrong parameters count } but that's OK: bool f() { if ( EventChartCustom( 0, 0, 0, 0, NULL ) ) //(2) нормально return (true); else return (false); } What is the fundamental difference? A100 2020.10.30 20:04 #28948 A compilation error: class A { A() {} }; void A() {} //(1) Error: 'A' - identifier already used but that's fine: void A() {} //(2) нормально class A { A() {} }; What is the fundamental difference? fxsaber 2020.10.31 03:19 #28949 Rule of thumb from the Marketplace. В Продуктах запрещен вызов любых DLL-библиотек, включая системные библиотеки Microsoft Windows. Does the Market product have the right to extend its functionality if the user is allowed to use the DLL? fxsaber 2020.11.01 08:28 #28950 Couldn't find any statistics on the Marketplace. So a question for sellers of cross-platform products. Do MT5 versions really sell better than MT4? 1...288828892890289128922893289428952896289728982899290029012902...3193 New comment
A compilation error:
used to work, but at the beginning of the year they broke the function pointers, it seems your code should still work in MT4
it will work:
i.e. now you have to use a temporary variable ( now you can't even use an array of pointers!!!! )
There is some contradiction here because
What is thedifference in principle?
One of the admins wrote a long time ago how the parsing is done, first static variables, then globally described, then the body of the function, parsing from top to bottom in the text
... but that's not accurate ;)
i.e. now you have to use a temporary variable ( now you can't even use the pointer array!!!! )
That's why I wrote it, so that Developers could do without the temporary
That's why I wrote, so that if possible, the Developers could do it without the temporary
i.e. now you have to use a temporary variable ( now you can't even use the pointer array!!!! )
Do you have an example to prove that you can't?
Do you have an example to prove that you can't?
wrote an example:
I was surprised, for some reason it generates a warning fn ptr[10]; //possible use of uninitialized variable 'ptr'
now I need to figure out how to initialize pointers to functions
Yes... I remember
Forum on trading, automated trading systems & strategy testing
Bugs, bugs, questions
A100, 2020.07.23 02:40
Error during compilation
I had a bug in last year's build, it all compiled and worked fine.
Forum for trading, automated trading systems & strategy testing
Bugs, bugs, questions
A100, 2020.07.23 16:31
I drew build 2085x32 from old stock - it all compiles well - you can try it yourself
What is the fundamental difference?
What is the fundamental difference?
Couldn't find any statistics on the Marketplace. So a question for sellers of cross-platform products.
Do MT5 versions really sell better than MT4?