Multiple choice technology mainframe

In an EVALUTE statement is the order of the WHEN clauses significant?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In an EVALUATE statement (COBOL's equivalent of a CASE/SWITCH structure), WHEN clauses are evaluated sequentially from top to bottom. The first clause whose condition evaluates to true is executed, so the order is significant when conditions overlap or when using WHEN OTHER (which must come last).