A very strange entry. Why specify the size of the post array in such a strange way. TheStringToCharArray function sets the right size to the dynamic array itself.ArrayResize seems to be superfluous here.
This is exactly what I understand.
MQL5 Reference / Data Conversion / StringToCharArray
The terminal 0 will also be copied into the target array, and the size of the dynamic array can be increased as needed to fit the string size.
MQL5 Reference / Data Conversion / StringToCharArray
The terminal 0 will also be copied into the recipient array and the size of the dynamic array can be increased to fit the string size, if necessary.
I'm certainly not a coding pedant, but are you changing the size of the array by repeatedly calling the function that performs string-to-char conversion?)))
You could do that:
int q = StringToCharArray(jsonbody,post,0,-1,CP_UTF8);
ArrayResize(post, q - 1);
Otherwise, we are calling the conversion of the same string twice. Moreover, the second time cancels the first one.
[in] Number of array elements to copy. Defines the length of the result string. The default is -1, which means copying to the end of the array, or meeting the terminal 0. The terminal 0 will also be copied to the destination array, and the size of the dynamic array can be increased to match the string size if needed. If the size of the dynamic array is larger than the string length, the array size will not be reduced.
We don't know whether this terminal null is there or not, but we reduce the size of the array post, so we may lose the closing bracket if no terminal null is there.
It is worth checking the integrity of the char-converted string by reverse-conversion.
Now, I suggest mastering STT (speach to text) to create voice control for the EA. The scheme is the same: connect to some cloud service (Google, for example) and use WebRequest to request a "live" text stream from the converted speech, which we then parse and send to the functionality. The result is very innovative.
ForecastOscilator_HTF The ForecastOscilator indicator with the timeframe selection option available in the input parameters. Flat_HTF The Flat indicator with the timeframe selection option available in the input parameters. FX5_SelfAdjustingRSI_HTF The...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
my point is that it doesn't matter.
your code (almost) works for russian.)
attention span has fallen asleep, apparently ))
You're welcome!
By the way, I need to tell TC that this one:
A very strange entry. Why specify the size of the post array in such a strange way. TheStringToCharArray function sets the right size to the dynamic array itself.ArrayResize seems to be superfluous here.
This is exactly what I understand.
MQL5 Reference / Data Conversion / StringToCharArray
The terminal 0 will also be copied into the target array, and the size of the dynamic array can be increased as needed to fit the string size.
this is exactly what is clear.
MQL5 Reference / Data Conversion / StringToCharArray
The terminal 0 will also be copied into the recipient array and the size of the dynamic array can be increased to fit the string size, if necessary.
I'm certainly not a coding pedant, but are you changing the size of the array by repeatedly calling the function that performs string-to-char conversion?)))
You could do that:
Otherwise, we are calling the conversion of the same string twice. Moreover, the second time cancels the first one.
Also, note the word "or" in the documentation:
[in] Number of array elements to copy. Defines the length of the result string. The default is -1, which means copying to the end of the array, or meeting the terminal 0. The terminal 0 will also be copied to the destination array, and the size of the dynamic array can be increased to match the string size if needed. If the size of the dynamic array is larger than the string length, the array size will not be reduced.
We don't know whether this terminal null is there or not, but we reduce the size of the array post, so we may lose the closing bracket if no terminal null is there.
It is worth checking the integrity of the char-converted string by reverse-conversion.
One, two, three, four, five, the bunny went for a walk! ))))
Yes ! it works !!! cool
just need more of thisJasop.mqh