Question: I have this:

```
#define ONE 1
#define TWO 2

switch {
    case ONE: {
        return ONE * ONE;
    }

    case TWO: {
        return TWO * TWO;
    }
}

```

and I want to do this:

```
#define ONE 1
#define TWO 2

switch {
    case ONE:
    case TWO:
     {
        return name_of_the_case_value * name_of_the_case_value;
    }

}

```

Now, what do I put instead of name\_of\_the\_case\_value? Something that works for both ONE or TWO.
Is there a pre-defined variable, like \_\_name\_of\_the\_case\_value, that holds the name of the current case value?

Answer: 
You cannot have this:

```
#define ONE 1
#define TWO 2

switch {
    case ONE: {
        return ONE * ONE;
    }

    case TWO: {
        return TWO * TWO;
    }
}

```

`switch` needs a value to switch according to... So you have:

```
switch (my_value) {
    case ONE: {
        return ONE * ONE;
    }

    case TWO: {
        return TWO * TWO;
    }
}

```

Hence your question is answered, as you can use `my_value` in the `case`.
This construction

```
#define ONE 1
#define TWO 2

switch {
    case ONE: {
        return ONE * ONE;
    }

    case TWO: {
        return TWO * TWO;
    }
}

```

is invalid because switch statement requires an expression. The case labels correspond to possible values of the expression. So if the control was passed to for example case ONE: then it means that the value of the expression is equal to ONE. Taking this into account you can write

```
#define ONE 1
#define TWO 2

switch ( expr ) {
    case ONE: 
    case TWO: {
        return expr * expr;
    }
}

```