If I remember correctly, previous versions of the compiler complained when I tried to set
too many iterations in the loop (LONG_MAX and ULONG_MAX), but the compiler won't say a word now...
In general, the compiler cannot know the number of iterations.
int f( ulong max )
{
int j = 1;
for ( ulong i = 0; i < max; i += ULONG_MAX )
j = 0;
return ( j );
}
voidOnStart()
{
ulong max = ULONG_MAX;
Print( "j=", f( max )); //результат j=1, а должно быть j=0
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Probably a calculation error (MT\930\32)
I have not calculated it myself, but with even i -> j = -1, and the last i=18446744073709551615/*ULONG_MAX */-1-> even
Probably a calculation error (MT\930\32)
I did not calculate it myself, but with even i -> j = -1, and the last i=18446744073709551615/*ULONG_MAX */-1-> even
Tried your script.
The unsetting happens in a moment from joining the graph. It feels like no control is passed to the loop at all.
It feels as if no control is being transferred to the loop at all.
It really is, but it's fast :)
If I remember correctly, previous versions of the compiler complained when I tried to set
too many iterations in the loop (LONG_MAX and ULONG_MAX) and now the compiler keeps silent...
I have version 910 32 bit.
It's silent and "quick to count" even so:
Although, supposedly, it should fall into an infinite loop.He swears where there is no need to swear, and where there is a need to swear, he keeps quiet.
Their manners!
If I remember correctly, previous versions of the compiler complained when I tried to set
too many iterations in the loop (LONG_MAX and ULONG_MAX), but the compiler won't say a word now...
In general, the compiler cannot know the number of iterations.
In general, the compiler cannot know the number of iterations