Case Selection Structure

Case statement:

DO CASE of variable
  case1:
    statement
    BREAK
  case2:
    statement
  other:
    statement
ENDDO

The PDL DO CASE construct is modified with the addition of a BREAK. This allows cases to fall through to the next case if there is no BREAK.

Example:

DO CASE of days overdue
  30:
    Send nice letter
    BREAK
  60:
    Send not nice letter
    BREAK
  90:
    Send nastygram
    BREAK
  120:
    Refer to collection agency
  other:
    Mourn
ENDDO

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset