Errors, bugs, questions - page 1137

 
A100:

Announcement

does not mean that class A should only have const methods. It only means that only const methods can be called in f() itself

I'm sort of aware of this. The problem is that Compare is virtual and is actually MY PERSONAL comparison function. I used to have the right to use non-static methods in MY function, but now I've been deprived of that ability.

I can't use my own Compare without const, because it won't be called in the algorithms of the standard library.

 
C-4:
Well, there is the option of asking mutable... But I doubt they will.
 
A100:

Static pointers could not be used before. Only previously the error was generated at declaration, now it is at initialization.

To do otherwise would mean to be able to use external variables of complex types, which has been repeatedly discussed as impossible.

Hmm, I must have missed this point. Well, then we can do without pointers altogether.
 
A100:

Static pointers could not be used before. Only previously the error was generated at declaration, now it is at initialization.

To do otherwise would mean the possibility to use external variables of complex types, which has been repeatedly discussed earlier as impossible.

Hello there. I've just found some lines in my code like:

static Settings* set;

that used to compile just fine. Now it doesn't.

 
Tron_KZ:
This is an example from the mql5 documentation. Here is the link to that page. And below is this code.
Thanks for the message, it's a compiler error - fixed.
 

C-4:

... used to compile just fine. Now it doesn't.

Thanks for the message, fixed.
 
So I solved the problem drastically. Removed all of the about 1000 const keywords from the standard library. The application ran fine, which once again proves the atavism of this word.
 
TheXpert:

This is actually the correct initialisation. A statik in a class has nothing to do with an object that is a statik.

And the fact that it doesn't compile really looks like a bug.

Service Desk replied promptly. They said there was indeed an error. They have already fixed it.
 

StringGetCharacter(.

Here's the code, doesn't output anything. If you open Sleep(0) or any empty statement that is not thrown by the compiler, it works, outputs character codes.

string  myString="И опыт, сын ошибок трудных"; void OnStart()   {    string word=""; // проходим по всем символам      for(int i=0;i<StringLen(myString);i++)      {

       ushort c=StringGetCharacter(myString,i);       //  Sleep(0);

      if(c>=1040 && c<=1103) Print("Русская буква! Код->",c);      }   }


 
Snaf:

StringGetCharacter(.

Here's the code, doesn't output anything. If you open Sleep(0) or any empty statement that is not thrown by the compiler, it works, outputs character codes.

Thanks for the post, the error has been fixed.