Question No. 1
Which of the following gives the correct description of FOUR-TIMES in the below statement PERFORM PARA-REPEAT UNTIL FOUR-TIME
O It is a data name
O It is a figurative constant
O It is a condition name
O None
Answers
Answer:
The PERFORM statement transfers control explicitly to one or more procedures and implicitly returns control to the next executable statement after execution of the specified procedures is completed.
The PERFORM statement is:
An out-of-line PERFORM statement
When procedure-name-1 is specified.
An in-line PERFORM statement
When procedure-name-1 is omitted.
An in-line PERFORM must be delimited by the END-PERFORM phrase.
The in-line and out-of-line formats cannot be combined. For example, if procedure-name-1 is specified, imperative statements and the END-PERFORM phrase must not be specified.
The PERFORM statement formats are:
Basic PERFORM
TIMES phrase PERFORM
UNTIL phrase PERFORM
VARYING phrase PERFORM
Basic PERFORM statement
The procedures referenced in the basic PERFORM statement are executed once, and control then passes to the next executable statement following the PERFORM statement.
Note: A PERFORM statement must not cause itself to be executed. A recursive PERFORM statement can cause unpredictable results.
Read syntax diagramSkip visual syntax diagram
Format 1: Basic PERFORM statement
>>-PERFORM------------------------------------------------------>
>--+-procedure-name-1--+-------------------------------+-+-----><
| '-+-THROUGH-+--procedure-name-2-' |
| '-THRU----' |
'-+------------------------+--END-PERFORM-------------'
'-imperative-statement-1-'
Explanation: