Errors, bugs, questions - page 2872

 
A100:

Of course it's my fault, I don't read the documentation and I came up with it.


Yes, I remember it well, that's why I asked you a question.
It's just that the documentation does not describe the use oftypename() in such syntax, as it is described for sizeof()
In the documentation for templates there is only an example of using in such syntax.
So I assumed that (typename)
would be allowed as well
But no, my mistake. Thank you for such a sensitive conversation. We understood each other and understood everything.

 
A100:
And still I cheated the system.

Double typename

Result: string

So this is direct evidence, not indirect.

I doubt typename in templates has anything to do with typename that returns type.

Since mql templates don't have values as parameters, only types, the keyword in typename in templates is redundant.

And the second typename is something like a macro, so double typename is a problem.

 
TheXpert:

Green is superfluous, but there are still two yellow ones and they are of the same context

template<typename T>
T f( T ) { return typename(T); }
void OnStart()
{
        Print(f(typename('+'))); //(1) нормально
}

so (1) is equivalent to (2)

        Print(typename(typename('+'))); //(2) Error: 'typename' - unexpected token
 
A100:

The green one is extra, but there are still two yellow ones

I agree, stupid.
 

Good day!




is this normal? )

and i just wanted to run the EA on one of today's 5s

 
Nikolai Karetnikov:

Good day!




is this normal? )

and i just wanted to run the EA on one of today's 5s

Everything is correct. There is no mistake. You just need to read the help.
 

When entering an EA input parameter value in the Terminal/Tester, the action of the ESC key is equated with ENTER. Is this behaviour correct?


Now, if the value is accidentally overwritten while entering, it is not possible to undo the entry and the previous value can be lost.

 

ME sometimes crashes (for several months now) when pressing ALT+LEFT several times.

The tabs of files opened before the crash are not saved.

 
Compilation error:
#define \ //Error: '\' - illegal escape sequence
LENGHT 100
 
Compilation error:
typedef void (*f)();
typedef void (*g)();
void h( g f ) { f(); } //Error: '(' - name expected
Reason: