Errors, bugs, questions - page 3110

 
Compile abstract error: code optimization failed
#define  SIZE    100000000
void OnStart()
{
static union X {
    int i;
} x[SIZE];
    bool b = true;
    for ( int i = 0; i < ArraySize(x) && (b = (x[i].i ==  0)); i++ );
    Print( b );
}

 

By F5 It hangs up:

#define  SIZE    100000
void OnStart()
{
static union X {
    int i;
} x[SIZE] = {};
    bool b = true;
    for ( int i = 0; i < ArraySize(x) && (b = (x[i].i ==  0)); i++ );
    Print( b );
}
 
Aleksey Mavrin #:

how come... Did they poach the developers from the public services or something?

Have you tried the broker's tech support (and their forum)? It's on their servers is such a miracle. What does it have to do with meta quotas?

 

Build 3121

ArraySize() returns an incorrect size in some cases.

An example where the error is reproduced:

struct MyStruct
{
   double first;
   double second;
};

void OnStart()
{
   MyStruct dynamicArray[];
   ArrayResize( dynamicArray, 5 );

   for( int i = 0; i < 5; i++ )
   {
      dynamicArray[i].first = rand();
      dynamicArray[i].second = rand();
   }

   MyStruct staticArray[5];

   for( int i = 0; i < 5; i++ )
   {
      staticArray[i].first = rand();
      staticArray[i].second = rand();
   }

   Print( "Size of dynamicArray = ", ArraySize( dynamicArray ) );
   Print( "Size of staticArray = ", ArraySize( staticArray ) );

   Print( "-----------------------------Dynamic array in function---------------------------------" );
   anyFuncion( dynamicArray );
   Print( "-----------------------------Static array in function----------------------------------" );
   anyFuncion( staticArray );
}

void anyFuncion( MyStruct& array[] )
{
   int sz = ArraySize( array );
   Print( "Size of array in function = ", sz );

   for( int i = 0; i < sz; i++ )
   {
      PrintFormat( "array[%i].first = %f", i, array[i].first );
      PrintFormat( "array[%i].second = %f", i, array[i].second );
   }
}
 
Koldun Zloy #:

Build 3121

ArraySize() returns an incorrect size in some cases.

An example where the error is reproduced:

Thank you. Fixed in 3123

 

Hello.

I can't download any product from the marketplace. What could this be about?

Thank you.

 
Ded-Leha-Tankist #:

Hello.

I can't download any product from the marketplace. What could this be about?

Thank you.

What operating system do you have and how many bits ?

 
Vladimir Pastushak #:

What operating system do you have and how many bits ?

2021.12.07 16:03:12.150 Terminal        MetaTrader 5 build 2361 started for MetaQuotes Software Corp.
2021.12.07 16:03:12.150 Terminal        Windows 7 Service Pack 1 build 7601, AMD Athlon II X2 240 Processor, 0 / 1 Gb memory, 43 / 82 Gb disk, IE 11, Admin, GMT+3
 
Ded-Leha-Tankist #:

Do you have a 32 bit operating system? If so, you need to work on a 64-bit operating system, as support for obsolete 32-bit systems has been discontinued.

 
Ded-Leha-Tankist #:

It was previously announced that support for 32 bit systems has been discontinued.

You need a computer with a 64 bit Windows system and at least 4gb. RAM.