Link to home
Start Free TrialLog in
Avatar of VTV
VTV

asked on

how to use value distance for "case" command

I want to use value distance for case command:
switch(i){
case 3 to 5:
printf("test");
}
error compile
ASKER CERTIFIED SOLUTION
Avatar of Axter
Axter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VTV
VTV

ASKER

PAQ
>>case 3 to 5:

A constant-expresion must follow case.
There's no way express value distance as a constant-expresion for a single case statement.

You have to use multiple constant for the desired effect.
What do you mean by PAQ?
Avatar of VTV

ASKER

I don't know what PAQ means.
I just follow instructions and I maybe misunderstand
Can you explain what PAQ means?
how can you post a answer?
VTV: If you mean you found the answer already in a PAQ (Previously Asked Question) you'll need to ask Community Support to delete this question and refund your points, because it has comments on it. If you mean something else you'll have to clarify.
PAQ stands for Previously Asked Question.

If the comment I posted answered your question, then you can select my comment as an answer by clicking on the button to the right of it.

If you're not sure, you can request that I post my comment as an answer.
Avatar of VTV

ASKER

I accept this comment
thanks