Is variable addition is allowed in case statements ?
(Thu, Sep 22, 2011 05:30:07 PM)
Because case 3+2 is equal to case 5. So ambiguity occurs.
(Wed, May 16, 2012 10:08:27 AM)
Yes addition is allowed in case statements but case 3+2 is equal to case 5 so ambiguity is occurs.
(Sat, May 19, 2012 11:37:52 AM)
Addition, multiplication, division are allowed in case statement but both the operand should be constant, operation is performed at compile time, for this case compiler get confused while choosing case 5 (ambiguity). So it will raise compile time error.