string EA input parameter is truncated. Why?, some workaround?

 

Hello folks, I have an EA with the following source code.

I pass some configuration through the inputs parameters like bellow:

input string settings = "A 0123456789. B 0123456789. C 0123456789. D 0123456789. E 0123456789. F 0123456789. G 0123456789. H 0123456789. I 0123456789. J 0123456789. K 0123456789.";

int OnInit() {
        printf("%s", settings);
        return 0;
}

The problem is that the output of the printf is:

"A 0123456789. B 0123456789. C 0123456789. D 0123456789. E 0123456789. F 0123456789. G 0123456789. H 0123456789. I 0123"

in other words, the "settings" parameter is truncated and I need to pass this value as an input to the EA.


Regards, Cyberglassed.

 
cyberglassed:

Hello folks, I have an EA with the following source code.

I pass some configuration through the inputs parameters like bellow:

The problem is that the output of the printf is:

"A 0123456789. B 0123456789. C 0123456789. D 0123456789. E 0123456789. F 0123456789. G 0123456789. H 0123456789. I 0123"

in other words, the "settings" parameter is truncated and I need to pass this value as an input to the EA.


Regards, Cyberglassed.

Other options: Use a second input parameter, use File Functions (FileOpen, FileReadString...) ...

HTH John 

 
jftjft:

Other options: Use a second input parameter, use File Functions (FileOpen, FileReadString...) ...

HTH John 

Thank you, I opted for the first option ;)
 
Thanks, it's interesting.
 
cyberglassed:
Thank you, I opted for the first option ;)

See documentation :

Note: The length of a string comment for Input variables cannot exceed 63 characters.