For some function, you need multi-statement nested expressions. You need to use the ExpressionBlock class to group these expressions. For example, all the statements inside of a FOR statement should be included in an expression block.
FOR(&Index, 1, PERIOD, SET(&Value, &Value + 1); SET(&countPl4, &countPl4 + 4); );
Use the following code to create an ExpressionBlock object:
&ExpressionBlock = create ExpressionBlock();