Go through the loop and collect the result via concatenation in string? And if you're not too lazy, you can do it that way (as it turns out, MT4 doesn't have ArrayPrint function):
voidOnStart(){
double arr[] = {1, 2 ,3 ,4.5, 5};
string res = ArrayFormat(arr, "%f", " - ");
Print(res);
}
template<typename T>
string ArrayFormat(T &arr[], string format = "%016llX", string delimeter = ", "){
string result;
for (int i = 0; i < ArraySize(arr); i++){
result += StringFormat(format, arr[i]) + delimeter;
}
result = StringSubstr(result, 0, StringLen(result) - StringLen(delimeter));
return result;
}
Because I really want to see how Peter did it. I'm just not on the computer myself at the moment.
Nikolai, I didn't set out to beat everyone. I just came up with my own solution. Then I looked at the previous pages and saw that there was a kind of competition. So, the goal to beat anyone or anything wasn't. It's just that all the time there are people who want to beat me. I have to respond in kind.
Nikolai, I didn't set out to beat everyone. I just came up with my own solution. Then I looked at the previous pages and saw that there was some sort of competition. So, the goal was not to beat anyone or anything. It's just that all the time there are people who want to beat me. I have to respond in the same way.
What's there to talk about?
Perhaps, how is it even more refined to smear the forum with shitcod.ahahaha ))) he wasn't even too lazy to write it
ahahahah ))) he wasn't too lazy to write it, either.
Of course he was. I need a laugh too. :)))
Of course I'm not lazy. I need a laugh, too. :)))
ArrayPrint()
ArrayPrint()
I didn't know that!!!))
Do you have a faster solution?
Go through the loop and collect the result via concatenation in string?
And if you're not too lazy, you can do it that way (as it turns out, MT4 doesn't have ArrayPrint function):
Result:
Well, if it's such a speed contest, I'll offer my own version:
Wrote a test script for all variants.
Who's next? :))Here is the result for an array of 1 000 000 elements (about 1000 extra values):
Peter, Awww....
Please, someone put Peter's code in here:
Nikolai, I didn't set out to beat everyone. I just came up with my own solution. Then I looked at the previous pages and saw that there was a kind of competition. So, the goal to beat anyone or anything wasn't. It's just that all the time there are people who want to beat me. I have to respond in kind.
Nikolai, I didn't set out to beat everyone. I just came up with my own solution. Then I looked at the previous pages and saw that there was some sort of competition. So, the goal was not to beat anyone or anything. It's just that all the time there are people who want to beat me. I have to respond in the same way.