In the first case, the variables are defined, and then the expression, then the variables are changed, but the result doesn't update with recalculate. In the second case, the expression is defined before the variables. When changing the variables, the result updates. Why does this happen?
in the first case you are defining the values and then an expression, the expression is evaluated and no longer depends on the external variables ...
while in the second case you are defining a function without parameters, so in this second case the value changes as you change the value of your variables.