Errors, bugs, questions - page 1760

 
Alexandr Bryzgalov:

why did mql5 make majik only positive?

i love negative majiks, man (((

Dennis Kirichenko:
It's a real bummer with the non-transparent ones... I don't know who was guided by what when they created them. It feels like different people from different organizations...

@Dennis Kirichenko, @Alexander Bryzgalov

there is no ambiguity.

INT(LONG) just takes half of the range from UINT(ULONG)

typecasting works without any limitations.

---

You can check it yourself.

long  a=-100

ulong ua=(ulong)a;

long b=(long)ua;

Print(a, " - ", ua, " - ", b);


Everything works as it should.

negative magicians may be used.

 
Vladimir Karputov:

Taken from theCPositionInfo class:

bool CPositionInfo::SelectByIndex(const int index)

almost in the middle of nowhere )

this example is very much expected in the help section:"account information"

 
Alexandr Bryzgalov:
almost in the middle of nowhere )
It's all relative: if you work with the standard library a hundred times a day, everything turns out to be very close :)
 
Vladimir Karputov:
It's all relative: if you work with the standard library a hundred times a day, everything turns out to be very close :)
working with the reference
 
o_O:

@Dennis Kirichenko, @Alexander Bryzgalov

there is no ambiguity.

INT(LONG) just takes half of the range from UINT(ULONG).

type conversion works without restriction

---

You can check it out for yourself.

long  a=-100

ulong ua=(ulong)a;

long b=(long)ua;

Print(a, " - ", ua, " - ", b);


Everything works as it should

negative magic can be used

See, at magic -1 it compiles and runs fine and finds it using this magic.

I was starting to get frustrated.

even so is silent:

uint Magik=(-1);
but it's still not negative, but very fucking much positive.)
 

Alexandr Bryzgalov:

only it's still not negative, but fucking positive.)

it doesn't change anything. for int it's -1
 
o_O:
it does not change anything. for int it is -1

The point is, if I set magik -1 and then compare it to zero, it will be greater than zero.

that's the point, we'll have to compare it to half uint or convert it to int

it's a matter of technique, but still ...
 
Alexandr Bryzgalov:

the thing is, if I set magik -1 and then compare it to null, it will be bigger than null.

here's the thing, you'll have to compare it to half uint or convert it to int

it's a matter of technique, but still ...

If you want to compare int with uint, the compiler should warn you about such an invalid comparison.

you must in any case perform the conversion to the same type. no buts

 

I have a specific bug related to compiler optimiser, it seems.

Large code doesn't work as it should - lags only in Release (Debug - normal).

After a day of dancing I found out that if I comment out ObjectFind in one place, the lags disappear.

However, I was unable to create a sample of a small size with the same problem.

I tried to leave ObjectFind in the original code but add a trivial Print before/after it. And there were no lags! When I take Print away, again slows down!

It seems that the compiler's optimizer has gone too far. I have no idea how to write it in CD, as I cannot create a small replay code. And if I write a big one, it will be hell to pay.

What may be done in this situation? I suppose chopping up a large code as long as it is reproducible is an option. But the project consists of many libraries. It has already taken me a whole day and I don't want to do it any more.

 

Dear developers!

Please make the debugger tooltips for variables like in the wizard.

So, I hover my mouse over a variable and a tooltip pops up with the current value of that variable. It would be very convenient.

Reason: