LearnMQL5/Structures.mq5
super.admin 6a3edd6cd7 convert
2025-05-30 15:03:27 +02:00

32 lines
2.3 KiB
MQL5

//+------------------------------------------------------------------+
//| Test.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"
struct Person
{
int Age;
double Weight;
};
//----
Person Ali;
Person Hamsa;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
Ali.Age=25;
Ali.Weight=100.10;
Hamsa.Age=24;
Hamsa.Weight=95.14;
//---
Print("Ali is ",Ali.Age," years old and his weight is ",Ali.Weight,"kg");
Print("Hamsa is ",Hamsa.Age," years old and his weight is ",Hamsa.Weight,"kg");
//---
}
//+------------------------------------------------------------------+