# Colon usage in CASE

##### Tags:

- C/AL
- Readability

##### Categories:

- Best Practice

The last possibility on a CASE statement must be immediately followed by a colon.

Bad code

    CASE DimOption OF
        DimOption::"Global Dimension 1" :
            DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code";

Good code

    CASE DimOption OF
        DimOption::"Global Dimension 1":
            DimValue."Dimension Code" := GLSetup."Global Dimension 1 Code";

Last modified February 24, 2022: Added tags & categories + cleanup (5ee04366) by waldo1001