Experience with Migrating the MQL4 Projects to MQL5 - page 2

 
Ovo Cz:
Feedback is welcome anywhere, any time. Even though those points really were not meant to be queries, I appreciate your reaction.
Basicly I ment that 2 starting points are of no importance for the experience in porting MT4 stuff to MT5 (because bugs and system design "features" are given "as is" so to speak, equally in both platforms). After that all seems relevant, so I think you should probably have a single post, where you keep all important records combined, and all the others skipped, just as a rock-solid reference.
 
Stanislav Korotky:
Basicly I ment that 2 starting points are of no importance for the experience in porting MT4 stuff to MT5 (because bugs and system design "features" are given "as is" so to speak, equally in both platforms). After that all seems relevant, so I think you should probably have a single post, where you keep all important records combined, and all the others skipped, just as a rock-solid reference.
Well, I called this discussion an experience, rather than a solid rock reference. If someone wants, he may continue here with a reference.
 
Currently I'm struggling with conversion of aforementioned StringConcatenate function. Is there any way to do it without manually fixing each occurrence? I have lots of this one to fix - any conversion trick would be welcome.
 
Marcin Madrzak:
Currently I'm struggling with conversion of aforementioned StringConcatenate function. Is there any way to do it without manually fixing each occurrence? I have lots of this one to fix - any conversion trick would be welcome.

To my knowledge, there is no provision for user-defined variadic functions.

You could do something like this maybe:

// untested; caveat emptor
string StringConcatenate(   const string s1,
                            const string s2,
                            const string s3="",
                            const string s4="",
                            const string s5="",
                            const string s6="")
{
    string retString;
    int count = StringConcatenate(retString, s1, s2, s3, s4, s5, s6);
    return retString;
}

If you need more than 6 arguments, alter the function to suit.

 
Anthony Garot:

To my knowledge, there is no provision for user-defined variadic functions.

You could do something like this maybe:

If you need more than 6 arguments, alter the function to suit.

Thanks a lot, works like a charm :)