START goe
    WHILE getopts finds dash option char
        CHOOSE getopts char
            CHOICE x
               PUT char found
            END CHOICE
            CHOICE y
               PUT char found with arg
            END CHOICE
            CHOICE z
               PUT char found
            END CHOICE
            OTHERWISE
               PUT unknown option error
               EXIT with error
            END OTHERWISE
        END CHOOSE
    END WHILE
    IF all args processed
        PUT message
    ELSE
        SHOW next arg
    ENDIF
    EXIT 0    
END goe
