hmmm...sounds like a trap :)
ok...it is like in C++ (disclamer - this is based on Jerome's sayings as
I mostly parallel with C++ ) ;)
regards,
bogdan
Jerome Martin wrote:
On Mon, 2007-05-14 at 19:34 +0300, Bogdan-Andrei Iancu
wrote:
Hi Jerome,
you can use strings also - no cast will be done. But the values must be
constants.
Yes, I knew that, this was just a teaser so you could state that
unlike C++ Openser can handle non-int in switch statements :-)
(Somehow mitigating the comparison with C for the const requirement ...)
regards,
bogdan
Jerome Martin wrote:
On Mon, 2007-05-14 at 12:12 +0300, Bogdan-Andrei
Iancu wrote:
Hi Peter,
the "case" syntax does not accept any variables, but only constant
values (like in C also :) )
But is it limited to int or implicitly-castable-to-int values, like in
C++ ?
Cheers,
Jerome