trash keyword?

To add comments, please log in or register
nicholi shen
1897
nicholi shen  
I can't find anything about the keyword "trash" that keeps popping up in my intellisense when I start typing "true". Anyone know why this is showing as an MQL keyword and what is its purpose?
Boyan Taksirov
3163
Boyan Taksirov  

It tells you that your code is a trash :)

Fernando Carreiro
4420
Fernando Carreiro  
nicholishen: I can't find anything about the keyword "trash" that keeps popping up in my intellisense when I start typing "true". Anyone know why this is showing as an MQL keyword and what is its purpose?

Congratulations on finding an MQL Easter Egg!

PS! This actually compiles:

void OnTick()
{
   trash;
}
nicholi shen
1897
nicholi shen  
Fernando Carreiro:
Congratulations on finding an MQL Easter Egg!

Yeah, I suppose the only ones that would find are the ones that tweak "List names after..." to less than three chars, but it's really annoying knowing that it does nothing because now I have to type three chars instead of two for "true". :-p

Stanislav Korotky
24586
Stanislav Korotky  

This is a rudimentary (obsolete) keyword, which have been planned for use in the following way:

void MyFunc(int val) trash
{
  Print("Val: ",val);
}

This should have obfuscate the function.

Lately this became senseless with new improved protection in MQL5.

Currently it does nothing.

Fernando Carreiro
4420
Fernando Carreiro  
nicholishen: Yeah, I suppose the only ones that would find are the ones that tweak "List names after..." to less than three chars, but it's really annoying knowing that it does nothing because now I have to type three chars instead of two. :-p
For me, it only appears after the third character on intellisense when I type "tra". It does not appear if I only type "tr".
Fernando Carreiro
4420
Fernando Carreiro  
Stanislav Korotky:

This is a rudimentary (obsolete) keyword, which have been planned for use in the following way:

This should have obfuscate the function.

Lately this became senseless with new protection in MQL5.

Thanks! It seems you have some "insider knowledge" on the subject!
Stanislav Korotky
24586
Stanislav Korotky  
Fernando Carreiro:
Thanks! It seems you have some "insider knowledge" on the subject!

Yes. The name of this knowledge is Russian forum ;-).

Fernando Carreiro
4420
Fernando Carreiro  
Stanislav Korotky: Yes. The name of this knowledge is Russian forum ;-).
I guess in future, I should start doing searches on the Russian section as well!
Stanislav Korotky
24586
Stanislav Korotky  
Fernando Carreiro:
I guess in future, I should start doing a searches on the Russian section as well!

You're welcome (though I'm not sure the automatic translation is good enough). Actually, I did know that I have read about the trash already.

Alain Verleyen
36131
Alain Verleyen  
Stanislav Korotky:

You're welcome (though I'm not sure the automatic translation is good enough). Actually, I did know that I have read about the trash already.

It's good enough to read (great lines, not subtleties) but searching is not easy, so you have to know what to read :-)
To add comments, please log in or register