[Users] How to use script variables in switch-cases?
Jerome Martin
jmartin at longphone.fr
Mon May 14 18:39:12 CEST 2007
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
>
Jérôme Martin | LongPhone
Responsable Architecture Réseau
122, rue la Boetie | 75008 Paris
Tel : +33 (0)1 56 26 28 44
Fax : +33 (0)1 56 26 28 45
Mail : jmartin at longphone.fr
Web : www.longphone.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070514/ba0355fb/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smiley-3.png
Type: image/png
Size: 819 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20070514/ba0355fb/attachment.png
More information about the Users
mailing list