Errors, bugs, questions - page 1003
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
ts==true and ts!=NULL are completely different expressions.
Moreover
ts==true and ts!=false are also different expressions
Do you know how they are different? Not only in syntax, but also in semantics.
Only the point of the question was that ts is an array. And why will this if(ts) compile and the above mentioned don't.
The expression if(ts) means that the array object ts actually exists. I specifically brought up semantics.
Do you want to prohibit compilation of this case or a warning will suffice? (By the way, there must be a warning. If there is no warning, it's our fault, something is broken off)
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
stringo, 2013.06.17 06:35
If(ts) expression means that the ts array object actually exists. I specifically mentioned semantics.
Do you want to prohibit the compilation of this case or is a warning enough? (By the way, there should be a warning. If there is no warning, it's our fault, something is broken)
void OnInit()
{
ts[0]=0;ts[1]=1;
if(ts)Print("ts[0]=0");
ts[0]=1;
if(ts)Print("ts[0]=1");
}
void OnTick()
{
}
ServiceDesk does not acknowledge the error, referring to the fact that identifiers cannot start with a number.
But 5Test is not an identifier, it is a filename. And file names can start with a digit and no restrictions have been imposed on #import .ex5 file names
ServiceDesk does not acknowledge the error, referring to the fact that identifiers cannot start with a number.
But 5Test is not an identifier, it is a filename. And filenames can begin with a digit and no restrictions were imposed on #import .ex5 file names
5Test::A is an identifier.
And 5Test is recognized as a file name as long as this name is enclosed in quotes in the import sentence (by the way, you have "5Test.ex5" written there as well).
That's why C/C++ compilers automatically add an underscore character (_) to the internal representation of function name in a file/module, so that the resulting name "_5TestA" doesn't start with a number, which ensures compatibility
As it turned out, so it turned out. You just have to accept it.
This is a dangerous place to edit - the compiler's behaviour can change so much that no one will be happy.
This is a dangerous place to edit - the compiler's behaviour can be changed so much that no one will be happy.
I agree.
Please take a look at this example:
The C/C++ compiler has enough brains to distinguish the aX variable from the aX( X ) parametric macro.
Parametric macros are the only alternative in the absence of inline functions and the names can often overlap in lengthy code
Agreed.
Please take a look at this example:
The C/C++ compiler in a similar situation has the wit to distinguish the variable aX from the parametric macro aX( X )Sure, just published examples the other day:
Thank you! I have understood it with your help.