Substitute for switch

Pages: 12
just joking for bumping up my post volume ;-)

I believe your words is the neatest one, no joke this time, I am serious. If you really like some words to cover your expertise, here is my dirty sentence below.

The program defines a Date class, it provides some functions to manipulate date, such as output a date in different formats. Unit test are also included in the program.
I want something simple.

This is a Date class
Last edited on
@EricDu ...haha i got you. Thanks for the help im gna keep the 1 i hv
I don't need a default in it. It is already stated previously in the code.


Just because you don't need a default case doesn't mean you shouldn't use one. It doesn't hurt to have a default case that simply outputs a message saying that something went wrong with your switch statement.
qwertyasdfgh wrote:
@EricDu : none of them LOL. Mine is neater. I say that because it is in one line.
What, no one's going to comment on this?
Topic archived. No new replies allowed.
Pages: 12