I have the following COBOL statement.
004250 IF SW-PRINT = 1
AND HLD-REC-TYPE = '5' OR '4' OR '6'
R11725 MOVE PRT-LINE TO HD-LINE
R11725* MOVE STAA-PRT-LINE TO HD-LINE
004270 PERFORM P1000-HEADING
011725 MOVE HD-LINE TO PRT-LINE
R11725* MOVE HD-LINE TO STAA-PRT-LINE
004280 GO TO W0005-CONTINUE.
My understanding is;
If SW-PRINT = 1 the AND statements are checked.
if HOLD-REC-TYPE does not happen to be '5' the checks for '4' and '6' will not be executed because of
not having been enclosed with (). Is this the correct understanding or am I incorrect?
Thanks
004250 IF SW-PRINT = 1
AND HLD-REC-TYPE = '5' OR '4' OR '6'
R11725 MOVE PRT-LINE TO HD-LINE
R11725* MOVE STAA-PRT-LINE TO HD-LINE
004270 PERFORM P1000-HEADING
011725 MOVE HD-LINE TO PRT-LINE
R11725* MOVE HD-LINE TO STAA-PRT-LINE
004280 GO TO W0005-CONTINUE.
My understanding is;
If SW-PRINT = 1 the AND statements are checked.
if HOLD-REC-TYPE does not happen to be '5' the checks for '4' and '6' will not be executed because of
not having been enclosed with (). Is this the correct understanding or am I incorrect?
Thanks