Chapter 13 Structured Texts 13.1.2 Statement The statement is a basic unit. It represents a complete task which can be executed. A complete statement may not be represented by a single line, but it always ends with a semicolon. A complete statement corresponds to a network in a ladder diagram. It represents a task. Take the sub-statement shown above for example. The value of the arithmetic expression D0* (D1+D2) is calculated, and the result of the operation is stored in D10. The arithmetic expression in the red frame in the figure below is not a legal statement. It is an expression. It is not a concrete task. It is like the ladder diagram shown below.
The ladder diagram lacks an output operand. It is not a complete program which can be executed. A structured text is composed of statements, and a statement is composed of elements. An example of a structured text is shown below. The complete statements in the structured text are in the red frames. * In a structured text, “ : = ” means “to assign”, and “ = ” means “to be equal to”. 13-3