Errors, bugs, questions - page 2429

 
Uriel Melliphant:


Insert code correctly:How toinsert code

 

Is there any way to hide the progress bar in the terminal?

It would be fine if it were stationary, but no! Why did you have to add animation?

 

what does this warning mean?


I don't see any problem - a simple comparison of two numbers...

 
Igor Zakharov:

what does this warning mean?


I don't see any problem - a simple comparison of two numbers...

And what are these two numbers of what type? And it would also help to use translation of error message - so you will immediately understand where your error is.

 
Vladimir Karputov:

What are these two numbers of what type? And you should also use the translation of the error message - that way you'll know immediately where your error is.

fabs() is always double

PeriodSeconds() is always int

The translation is obvious too...

Here's the answer:

https://www.mql5.com/ru/forum/1111/page166#comment_29753

but I'm not sure if it applies in my case...

if(fabs(Start-End)/1000 > (double)PeriodSeconds(PERIOD_D1)*10)

so no warning, but it looks like a perversion

Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • 2010.10.15
  • www.mql5.com
Общее обсуждение: Ошибки, баги, вопросы
 
Igor Zakharov:

fabs() always double

PeriodSeconds() is always int

The translation is obvious too...

Here's the answer:

https://www.mql5.com/ru/forum/1111/page166#comment_29753

but I'm not sure if it applies to my case...

fabs(Start-End)/100 what type is it? А?


Reference:Type conversion

 
Vladimir Karputov:

fabs(Start-End)/100 what type is it? А?


Reference:Type conversion

double/int = double

 
Igor Zakharov:

double/int = double

Yes, that's right. And this is the double you are comparing with int(PeriodSeconds -> int).

 
Vladimir Karputov:

Yes, that's right. And this is the double you are comparing with int (PeriodSeconds -> int).

и?
 
Vladimir Karputov:

Yes, that's right. And this is the double you are comparing with int (PeriodSeconds -> int).

Normally, there's no problem with such a comparison, here are artificial examples. The compiler warns only in the above case:


Reason: