Skip to content

Case else break

Description

This statement is optional and can be used once in each Select Case End structure to catch all values not used in Case Break situations above.

Syntax

Select Case <Expression>
    Case <Constant>
        <Statements>
    Break
    Case Else
        <Statements>
    Break
End

Sample

select case {Customer.PhoneCountryCode}
    case 1
        return "USA"
    break
    case 31
        return "The Netherlands"
    break
    case 49
        return "Germany"
    break
    case else
        return "All other countries?"
    break
end

Notes

  • The constant values should only appear once; if they appear multiple times the first compare wins.