Expression

 

what happens if I do this,


x = y = z

 

Sometimes it's easier to check:

//+------------------------------------------------------------------+
//|                                                     Script 1.mq5 |
//|                              Copyright © 2021, Vladimir Karputov |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2021, Vladimir Karputov"
#property version   "1.000"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   int x=1,y=2,z=3;
   Print("START: x(",(string)x,"), y(",(string)y,"), z(",(string)z,")");
   x = y = z;
   Print("END: x(",(string)x,"), y(",(string)y,"), z(",(string)z,")");
//---
  }
//+------------------------------------------------------------------+

Result:

START: x(1), y(2), z(3)
END: x(3), y(3), z(3)
Files:
Script_1.mq5  2 kb
 
Vladimir Karputov #:

Sometimes it's easier to check:

Result:

Thanks I appreciate it! haha