Let’s assume we want to use the value of variable z, obtained as a result of the following calculations: x = f1(a,b); y = f2(c,d); z = f3(x,y), where a, b, c, d are the parameters of functions, f1, f2, f3 are functions (arithmetic, logical, comparison, or actions), and x, y, z are calculated values.

The process of building an expression in the constructor will look like this:

z = f3(f1(a,b), f2(c,d))

That is, just as we write expressions in algebra. In the constructor, we will sequentially perform the following actions:

  1. Select the function (operation) f3 from the constructor.
  2. As the first argument of the function f3, select the function f1.
  3. As the second argument of the function f3, select the function f2.
  4. Set the values of the first and second arguments for function f1 - the values of parameters «a» and «b».
  5. Set the values of the first and second arguments for function f2 - the values of parameters «c» and «d».
  • Нет меток