Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1669-standardlibrary-datastructures-carrayfloat-carrayfloatcomparearray.md
T
2026-06-23 21:47:51 +08:00

46 lines
797 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CompareArray
Compares the array with another one.
```
bool  CompareArray(
   const float&  src[]      // source array
   ) const
```
Parameters
src[]
[in]  Reference to an array used as a source of elements for comparison.
Return Value
true - arrays are equal, false - arrays are not equal.
Example:
```
//--- example for CArrayFloat::CompareArray(const float &[])
#include <Arrays\ArrayFloat.mqh>
//---
float src[];
//---
void OnStart()
  {
   CArrayFloat *array=new CArrayFloat;
   //---
   if(array==NULL)
     {
      printf("Object create error");
      return;
     }
   //--- compare with another array
   int result=array.CompareArray(src);
   //--- delete array
   delete array;
  }
```