If I evaluate independent variables in the same EVALUATE TRUE block, are they evaluated in the order they are listed?
E.g., if it’s “COLD” and “SUNNY”, would I ever “BRING SUNGLASSES?” Or would I just “WEAR SWEATER” and exit the block?
EVALUATE TRUE
WHEN COLD
WEAR SWEATER
WHEN SUNNY
BRING SUNGLASSES
END-EVALUATE
In many other languages, we often need to insert break statement (or similar) to each selection, so that it does not fall through. However that’s not the case in COBOL evaluate, COBOL evaluate ends when one of those selections satisfies (or none).