Errors, bugs, questions - page 1043

 
 
Silent:
This?
Thank you very much, and also for being so quick. I've written and rewritten so much, and still couldn't find such elementary stuff)))
 

And I was just looking in the MQL spreadsheet

 
07041982:

And I was just looking in the MQL spreadsheet

It happens. What a lot of stuff I found all at once :)
 
10 class E {
20 static uint a,
30           b;
40 static long c; 
50 };
60
70 static uint E::a = 1,
80           E::b = 2, //ошибка, хотя для обычных static вне класса и внутри функций - нормально (строки 110-130) 
90 static long E::c = 3; //не выдает ошибку, хотя после запятой сменился тип с int на uint
100
110static uint d = 5,
120          e = 6, //нормально
130static long f = 7; //ошибка - правомерно, после запятой сменился тип

I think that line 80 should not give an error, and line 90 should give an error, although it does not. That the order is not mixed up is confirmed by separate compilation respectively without line 80 and 90

Otherwise, different behavior for declarations in class (lines 70-80) and out of class (lines 110-130).

 
A100:
There is a suspicion that the compiler considers b to be non-static.
 
class E {
static uint a,
          b;
};

uint E::a = 1,
uint E::b = 2; //uint избыточен, поскольку запятая

Like this, it's fine,

uint E::a = 1,
    E::b = 2; //ошибка
and this is an error, even though it was expected to be the other way round
 
How to get the clearing price. I don't understand anything from the certificate. Please tell me.
 
zfs:
I don't understand anything from the reference.
What reference did you read?
 
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5