Errors, bugs, questions - page 3019
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
it seems that count=0 works in the same way as count=-1 and in case of "" it copies a terminal null.
This is where the error lies, just shown with a practical example where ingeneral there can be both empty strings and count = 0 by itself (in a loop for example)
And how many
should it copy if count = 0 ?
Hint: 3 characters are copied when count = 3.
I'm not even going to argue. It works correctly.
Looks like count=0 works the same way as count=-1 and in the case of "" it copies a terminal null, so you can't properly convert an empty string without additional checks
An empty string (NULL) does not contain a terminal null. Everything seems to work logically there.
I'm not even going to argue. It works correctly.
If there are no arguments, then of course you don't have to.
An empty string (NULL) does not contain a terminal null. In my opinion, everything works there logically.
An empty string is "" and NULL is not an empty string - it is an uninitialized string, i.e. it is not a string at all andStringToCharArray with NULL does not work, error result: 4009
If there are no arguments, then of course you don't need
An empty string is "" and NULL is not an empty string - it's an uninitialized string, i.e. it's not a string at all andStringToCharArray with NULL does not work, error result: 4009
You are mistaken, to put it mildly.
You are mistaken, to put it mildly.
Please explain if you have anything to say on the merits
Please explain if you have anything to say on the merits
Result: false
What is the contradiction with this statement?
Forum on trading, automated trading systems & strategy testing
Bugs, bugs, questions
A100, 2021.05.24 20:07
Empty string is "" while NULL is not an empty string - it is an uninitialized string which means it is not a string at all andStringToCharArray with NULL does not work and causes error: 4009
Result: false
And what is the contradiction with this statement?
The variable is initialized. You can, of course, think of string as a pointer to an internal string class.
The variable is initialised. You can, of course, think of string as a pointer to an internal string class.
If it's initialized, then why the
error 4009
ERR_NOTINITIALIZED_STRING
4009
Uninitialized string
I'm not even going to argue. It works correctly.
An empty string (NULL) does not contain a terminal null. In my opinion, everything works there logically.
That's not the problem, the problem is that this code returns 4 and should return 0.