‎2008 Mar 18 5:20 PM
Hi friends i am not gettingthe out put for case statement like my code is..
Parameters: a type i.
case 'X'.
when 10.
write: 'ten'.
when 20.
write: 'twenty'.
when others.
write 'others'.
endcase.
but i am failing to get the output with the above code can any one help me with the above wheather i am going wwrong with commos or syntax error.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 5:19 PM
‎2008 Mar 18 5:22 PM
use this..
Parameters: a type i.
case a.
when 10.
write: 'ten'.
when 20.
write: 'twenty'.
when others.
write 'others'.
endcase.
regards,
venkat.
‎2008 Mar 18 5:23 PM
Chang ur code to:
Parameters: a type i.
Case a.
when 10.
write: 'ten'.
when 20.
write: 'twenty'.
when others.
write 'others'.
endcase.
since ur variable is a.
‎2008 Mar 18 5:27 PM
You should write this way
parameter: x type i.
case X.when 10.
write: 'ten'.
when 20.
write: 'twenty'.
when others.
write 'others'.
endcase.
No single quotes for X.