Array references - page 5

 
TheXpert:
Oh, my kneecaps to you, I'm just starting to dig.

Well, here's my digger, I made it a little more comfortable.

#import "msvcrt.dll"
  long memcpy(uchar &dst[], long &src, int cnt);
  long memcpy(uchar &dst[], int &src, int cnt);
#import

struct ArrayStore
{
   long offset;
   double x[][15];  // == 0x5800 0100 0800
   // long x[][15];  // == 0x5500 0100 0800
   // ulong x[][15];  // == 0x5600 0100 0800
   
   // int x[][15];  // == 0x5200 0100 04
   // uint x[][15];  // == 0x5300 0100 04
   // short x[][15]; // == 0x5000 0100 02
   // ushort x[][15]; // == 0x4F00 0100 02
   //char x[][15];  // == 0x4D00 0100 01
   //uchar x[][15];  // == 0x4E00 0100 01
   long reserved;

};

#define N 76
// sizeof(ArrayStore) == 60

void OnStart()
{
   ArrayStore store;
   ArrayResize(store.x, 0x11, 0x22);
   store.offset = 0;
   store.reserved = 0xEEEEEEEEEEEEEEEE;
   
   uchar array[N];
   ArrayInitialize(array, 0);
   
   memcpy(array, store.offset, N);
   Print("===== Start =====");
   for(int j=0;j<8;j++)
   {
    string s="";
    for (int i = 0; i < 8; i++)
     {
        s = s + ((i%4==0)?" : ": " ")+ StringFormat("%.2X", array[i+8*j+8]);
     }
     Print(s);
   }
   
ArrayResize (store.x , 31,3);    

   memcpy(array, store.offset, N);
   Print("=====  =====");
   for(int j=0;j<8;j++)
   {
    string s="";
    for (int i = 0; i < 8; i++)
     {
        s = s + ((i%4==0)?" : ": " ")+ StringFormat("%.2X", array[i+8*j+8]);
     }
     Print(s);
   }
   
ArrayResize (store.x , 0, 7);    

   memcpy(array, store.offset, N);
   Print("=====  =====");
   for(int j=0;j<8;j++)
   {
    string s="";
    for (int i = 0; i < 8; i++)
     {
        s = s + ((i%4==0)?" : ": " ")+ StringFormat("%.2X", array[i+8*j+8]);
     }
     Print(s);
   }
   Print("===== End =====");
}
 
TheXpert:
There should also be an AsSeries flag and possibly some others.
О! Right, in the third byte the fourth bit (counts down from bit zero)
 

By the way, I made a mistake there in mine -- in the import all longs should be replaced by ints.

Question -- why did you need second dimension?

Another question -- where did 76 come from? the sizeof your structure is 52 + 2*8 = 68;

 
TheXpert:

By the way, I made a mistake there in mine -- in the import all longs should be replaced by ints.

Question -- why did you need second dimension?

I did the third ;)) -- to study the reaction of the structure.


Another question -- where did 76 come from? the sizeof your structure is 52 + 2*8 = 68;

Ah, I was looking at real sizeof of array's structure, so I've added some known data (
store.reserved = 0xEEEEEEEEEEEEEEEE;
) and scanned through.
 

More suggestions for possible flags -- static/dynamic and indicator/conventional

static\dynamic is out, static like "long x[5]" is not written as a structure, but as an array of logs.

 

That's about it for now:

// Array Struct
struct Array
{
   short type; // номер типа, вначале стандартные, потом пользовательские, каждому пользовательскому типу присваивается свой порядковый номер.
   short flags; // тут пока хз, есть только знание о флаге AsSeries
   int sizeoftype; // размер типа == sizeof(type)
   int dim1size; // размер 1-й рамерности
   int dim2size; // размер 1-й рамерности
   int dim3size; // размер 1-й рамерности
   int dim4size; // размер 1-й рамерности
   int reservedsize; // размер с учетом резерва (именно столько выделяется памяти)
   int ptr; // указатель
   int reserved1; //
   int reserved2; //
   int reserved3; //
   int reserved4; //
   int reserved5; //
};

That should be enough for the idea, so we can try and implement it.

I'm done for today.

 

Don't feel sorry for your time...

MQ should do such things, otherwise all this work can go down the drain, for example, with the release of a new build.

It would be much more logical to justify the need for such improvements intelligently and intelligently, then maybe MQ would do it "to order".

 
komposter:

It would be much more logical to justify the need for such modifications intelligently and intelligibly, then maybe MQ would do it "to order".

MQ will certainly not make any money, so it is up to them to do it themselves.
 
sergeev:
MQ is definitely not going to make any money, so you have to do it yourself.
To begin with, you need to understand WHY? And what good will it do?

Oh, and thanks to those involved, thanks to posts in this thread I discovered that the description in the help is outdated...
 
mql5:

Yes and thanks to those involved, thanks to posts in this thread I discovered that the description in the help is out of date...

Ilyas, that's what to call it :))

I gather the whole MK team were holding their bellies while they watched the search. And the reference was so close... :)

But you can see that the forum are real professionals who can only reconstruct the structure and understand what's responsible for what.


PS

was the help already corrected?

Reason: