What is the difference between Sequence control and data control?

Compiler DesignProgramming LanguagesComputer Programming

Sequence Control

Sequence control defines the line-by-line implementation by which statements are implemented sequentially, in the equivalent order in which they occur in the program. It can move out a sequence of read or write operations, arithmetic operations, or assignments to variables. A sequence control structure can be either implicit or explicit.

Implicit Sequence Control − Implicit sequence control structures are those represented by the language. Implicit sequence control is decided by the sequence of the statements in the source code or by the built-in implementation model. The implicit sequence control structure tends to be in consequence except that transformed by the programmer explicitly. An example of an implicit sequence control includes −

  • In many programming languages, the physical sequence of statements provides the sequence control mechanism for execution.

  • A language-defined hierarchy of operations provides the control for the execution order of operations in expression.

Explicit Sequence Control − Explicit sequence control structures are those defined by the programmer to transform the implicit sequence control defined by the language. An example of an explicit sequence control includes −

  • The programmer can use goto statements and statement labels after implicit sequence control.

  • The implicit execution order of operations in expressions can be explicitly altered by using parenthesis within the expression.

Data Control

Data control is defined as the control of the transmission of data for each operation of a program. The data control features of a programming language are concerned with the following aspects −

  • The approachability of information at several points during program execution.

  • The determination of how data can be supported for each operation, and how a result of one operation can be stored and fetched for later use as an operand by a subsequent operation.

Let us see the comparison between Sequence control and data control.

Data ControlSequence Control
The control of the communication of data among the subprograms of a program is defined as data control.
The control of the procedure of the execution of operations, both primitive and user-defined is defined as sequence control.
Data control is ruled by the dynamic and static scope rules for an identifier.
Sequence control is ruled by notations in expressions and the hierarchy of operations.
A data object can be made available through two methods such as −
  • Direct Transmission and
  • Transmission through Reference.
Sequence control structures can be either explicit or implicit. Implicit sequence control structures are those represented by the language and explicit are those that the programmer may optionally use.
Data control structures may be categorized according to the referencing environment of data.
Sequence control structures can be conventionally categorized into three groups such as −
  • Structures used in expressions.
  • Structures used between statements and
  • Structures used between subprograms.
Data control is concerned with the binding of identifiers to specific data objects and subprograms.
Sequence control is concerned with decoding the instruction and expressions into executable form.
raja
Published on 23-Oct-2021 11:23:52
Advertisements