28 lines
1 KiB
MQL5
28 lines
1 KiB
MQL5
|
//+------------------------------------------------------------------+
|
||
|
//| Array.mq5 |
|
||
|
//| Copyright 2020, MetaQuotes Software Corp. |
|
||
|
//| https://www.mql5.com |
|
||
|
//+------------------------------------------------------------------+
|
||
|
#property copyright "Copyright 2020, MetaQuotes Software Corp."
|
||
|
#property link "https://www.mql5.com"
|
||
|
#property version "1.00"
|
||
|
//+------------------------------------------------------------------+
|
||
|
//| Script program start function |
|
||
|
//+------------------------------------------------------------------+
|
||
|
void OnStart()
|
||
|
{
|
||
|
//---
|
||
|
int Arr[];
|
||
|
for(int i=1; i<11; i++)
|
||
|
{
|
||
|
ArrayResize(Arr,ArraySize(Arr)+1);
|
||
|
Arr[ArraySize(Arr)-1]=i;
|
||
|
|
||
|
}
|
||
|
for(int x=0; x<ArraySize(Arr); x++)
|
||
|
{
|
||
|
Print(Arr[x]);
|
||
|
}
|
||
|
}
|
||
|
//+------------------------------------------------------------------+
|