Commit UEA [20/06/2018]

This commit is contained in:
Pierre8rTeam
2018-06-20 15:35:55 +02:00
parent f2422666dd
commit 25b50c07ff
637 changed files with 1151 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
//+------------------------------------------------------------------+
//| Test.mq5 |
//| Copyright 2015, Vasiliy Sokolov. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, Vasiliy Sokolov."
#property link "https://www.mql5.com"
#property version "1.00"
#include "ObjectsCustom.mqh"
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
CObjectCustom *arrayObj[3];
arrayObj[0] = new CHuman();
arrayObj[1] = new CWeather();
arrayObj[2] = new CBar();
for(int i=0; i<ArraySize(arrayObj); i++)
{
CObjectCustom *obj=arrayObj[i];
switch(obj.Type())
{
case TYPE_HUMAN:
{
CHuman *human=obj;
human.Run();
break;
}
case TYPE_WEATHER:
{
CWeather *weather=obj;
printf(DoubleToString(weather.Temp(),1));
break;
}
default:
printf("unknown type.");
}
}
}
//+------------------------------------------------------------------+