Questions from Beginners MQL5 MT5 MetaTrader 5 - page 26

 
In the examples, I often see the following example
//--- случайным образом создаём одну из 7 возможных фигур
   int nshape=rand()%7;
   switch(nshape)
     {
      case 0: m_shape=new CTetrisShape1; break;
      case 1: m_shape=new CTetrisShape2; break;
      case 2: m_shape=new CTetrisShape3; break;
      case 3: m_shape=new CTetrisShape4; break;
      case 4: m_shape=new CTetrisShape5; break;
      case 5: m_shape=new CTetrisShape6; break;
      case 6: m_shape=new CTetrisShape7; break;
Is it to be understood that any of seven variants of CTetrisShape1 function is called really randomly, as if I were throwing a cube with seven edges?
 
Dimka-novitsek:
In the examples I see often there is an example Should this be taken to mean that any of the seven variants of the CTetrisShape1 function is called really randomly, as if I were to roll a cube with seven edges?
If you want to learn a language, you should write in it (even experimental code) using the language constructs you're currently studying. This question is a purely infantile provocation, and directed at the person who is helping you here.
 
Dimka-novitsek:
In examples, I often see an example. Should I understand it so, that any of seven variants of CTetrisShape1 function is called really randomly, as if I roll a cube with seven edges?

Well, this is an example from tetris, where the shapes should fall out in random order.

The code itself is executed deterministically and only rand() gives a pseudo-randomness to the process.

 
Here, I am writing and parsing examples. What kind of provocation is that? I am learning, and here really half of the words are incomprehensible, at least deterministic and pseudo-random. I'm really asking! I'm sorry if I don't understand anything at once. Thank you, I will ask.
 
Thank you! I read about the pseudo-randomness. Really interesting!!! I get it in general. Thanks for the clear answer!!!
 
Dimka-novitsek:
Here, I am writing and parsing examples. What kind of provocation is that? I am learning, and here really half of the words are incomprehensible, at least deterministic and pseudo-random. I'm really asking! I'm sorry if I don't understand anything at once. Thanks, I'll keep asking.
Does Google not work? Or is Wikipedia dead?
 

Please advise how to check the conditions in the code, e.g:

// 1
if (cond1==var1 && cond2==var2 && cond3>=var3 && cond4<=var4)
{ c=a+b;
}

// 2
if (cond1==var1) if (cond2==var2) if (cond3>=var3) if (cond4<=var4)
{ c=a+b;
}

// 3
if (cond1==var1)
{  if (cond2==var2)
   {  if (cond3>=var3)
      {  if (cond4<=var4)
         c=a+b;
      }
   }
}
 
I guess all three options are equal and correct!!! And so, let the experts tell you. I like the first option better.
 
I'm not comfortable with it. I do a lot of research on reference books and wikipedia. It happens that there are so many new words, terms, references in the text that you really need the words of a living person to understand something. Urain, thanks again!!!
 
I don't understand something about position modification, it's not clear from MQL5 Reference. I don't see the corresponding function in the list of trading functions, could someone please give me a code example?
Reason: