Errors, bugs, questions - page 1732

 

I don't understand if this is a bug or should it be?ENUM_CHART_PROPERTY_INTEGER values are defined as[UNKNOWN ENUM]:: For example:

- CHART_WINDOWS_TOTAL is defined as[UNKNOWN ENUM]::101

-CHART_WINDOW_IS_VISIBLE - defined as [UNKNOWN ENUM]::102

And of courseChartSetInteger function generates error 4109 - False ID of chart property.

MT5 and ME v1447 x64 version

 
fxsaber:
How can we justify that const A * == A const *? It is not.

We have 3 places to put const.

(1)const <type> (2)const * (3)const

(1) to a type (3) to a pointer, there are no options here. It makes sense to refer (2) to a type because the pointer is an attribute of the type and not vice versa.

 
Комбинатор:

We have 3 places to put const.

(1)const <type> (2)const * (3)const

(1) to type (3) to pointer, there are no options here. And (2) is logically attributed to the type because the pointer is an attribute of the type and not vice versa.

(1)const <type> (2)const * (3)const &

  1. type.
  2. pointer
  3. reference.
From left to right reads.
 
fxsaber:

(1)const <type> (2)const * (3)const &

  1. type.
  2. pointer
  3. reference.
Read from left to right.
would that help?
 
fxsaber:

Firstly, by the very nature of the link, it makes no sense to make it constant.

Secondly, if it made sense,

const A * const & const [] -- this is what I think is correct.

 
Комбинатор:

First, by the very idea of the link there is no sense in making it constant.

Second, if there were sense in it,

const A * const & const [] -- this is what I consider correct.

It makes sense to make the reference a constant. But I see the entry as illogical.

I was cherishing a nice tree of language understanding but here you see such vandalism ))

 
fxsaber:

It makes sense to make the reference a constant.

An example?

 
Комбинатор:

An example?

When you want to ensure that the elements and size of an array are not changed.
 
fxsaber:
When you want to guarantee that elements and size of array will not be changed.

Reference for arrays is a crutch in the MQL language, not a reference.

And if [] is a type modifier like *, it should have its own const! and not a reference.

 
coderex:

- CHART_WINDOWS_TOTAL - defined as[UNKNOWN ENUM]::101

-CHART_WINDOW_IS_VISIBLE - defined as [UNKNOWN ENUM]::102

And of course theChartSetInteger function generates error 4109 - Faulty Chart Property Identifier.

The error is justified - these identifiers are specified as ReadOnly (r\o) in the Documentation https://www.mql5.com/ru/docs/constants/chartconstants/enum_chart_property, which is not compatible with ChartSetInteger
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5