Built-in methods for working with arrays not being recognised by compiler.

 

According to the MQL5 documentation, there are several built-in methods for working with arrays, that were introduced relatively recently several builds back, but I can't remember when.

However, in reality, most of them are not recognised by the compiler (build 3521) and it throws an error message. For the sake of example, I'm mentioning only two of them, namely "Free" and "Resize".

'Free' is not a member of 'array' type
'Resize' is not a member of 'array' type

Method

Analog

Description

void array.Free();

ArrayFree

Releases the dynamic array buffer and sets the zero dimension size to 0 (zero)

int array.Resize(const int range0_size, const int reserve);

int array.Resize(const int range_sizes[], const int reserve);

ArrayResize

Sets a new size in the array first dimension


Has anyone else being using these newer array methods successfully or have they being failing for you too?

 

According to a search, the array methods started being added with build 3260 (March 2022) — New MetaTrader 5 Platform build 3260: Bulk operations, matrix and vector functions, and chat enhancements

However, I can't find any updates after that, about additions to the built-in methods for arrays.

Maybe they have been forgotten and only exist in the documentation. 😅

 


Same result

//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   double Ar[];
   Ar.Free();
   Ar.Resize(23);
  }
//+------------------------------------------------------------------+

//'Free' is not a member of 'array' type        ArrayTest.mq5   16      7
//'Resize' is not a member of 'array' type      ArrayTest.mq5   17      7
 
Enrique Dangeroux #: Same result

Usually one would first implement functionality and then produce documentation for it.

MetaQuotes, however, seems to prefer putting the "cart before the horse", by making the documentation first before the implementation. 😁

 

When did this happen ? i recall them being revoked ? ( if its the proper word , walked back , canceled , changed mind)

i tried some likely variations they don't work either :

   double Ar[];
   Ar.Assasinate();
   Ar.NewCountNotLikePreviousCount(23);
 
Lorentzos Roussos #: When did this happen ? i recall them being revoked ? ( if its the proper word , walked back , canceled , changed mind.) i tried some likely variations they don't work either :

If they were revoked, then the least they could have done was either remove it from the documentation or put a note there stating that it is "unimplemented".

Otherwise, others such as myself, may try to use them only to end up disappointed with the error messages.

 
Fernando Carreiro #:

If they were revoked, then the least they could have done was either remove it from the documentation or put a note there stating that it is "unimplemented".

Otherwise, others such as myself, may try to use them only to end up disappointed with the error messages.

Yeah , their focus is elsewhere probably 

 
Lorentzos Roussos #:

Yeah , their focus is elsewhere probably 

Rumor says, soon there will be TikTok integration.

 
Enrique Dangeroux #:

Rumor says, soon there will be TikTok integration.

awesome , i hope they add onlyfans too

 
Lorentzos Roussos #: awesome , i hope they add onlyfans too

Yeah, a few NSFW charts of XXX/USD price quotes would be perfect content. 😂

 
Fernando Carreiro #:

Yeah, a few NSFW charts of XXX/USD price quotes would be perfect content. 😂

Great idea !