I'm producing some reports in large strings and print them to the terminal and I've noticed that the Print() function with very large strings truncates them after some thousands characters.
For example, this scripts does not print the entire string:
The output is the following (identical with both build 4731 and build 4585):
The string length is correct and this means that the problem is not in the string but in the implementation of the Print() function.
I created a custom print function which splits the input string in lines and iterates on the lines and prints them. This function works as expected but I don't want to create my own function to carry out this trivial task.
Is this a know limitation? Is there any setting or workaround to make the Print() function work properly with very large strings?
Thanks for your help!
Remember that Print() is outputting to the Experts log file, and so you don't really want to have big log files. So, consider outputting to your own text files instead.
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm producing some reports in large strings and print them to the terminal and I've noticed that the Print() function with very large strings truncates them after some thousands characters.
For example, this scripts does not print the entire string:
The output is the following (identical with both build 4731 and build 4585):
... ... ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRST 270000
The string length is correct and this means that the problem is not in the string but in the implementation of the Print() function.
I created a custom print function which splits the input string in lines and iterates on the lines and prints them. This function works as expected but I don't want to create my own function to carry out this trivial task.
Is this a know limitation? Is there any setting or workaround to make the Print() function work properly with very large strings?
Thanks for your help!