Skip to content

nodefault

The nodefault keyword is used to assert that a switch has no default. Branching to the nodefault must terminate the program with a diagnostic message.

Syntax

nodefault;

Example Code

switch (value)
{
case 0:
    break;
case 1:
    break;

nodefault;
}