[Devel] 'switch' statements

Daniel-Constantin Mierla daniel at voice-system.ro
Tue Jul 12 11:26:02 CEST 2005


On 07/11/05 21:52, Juha Heinanen wrote:

>Daniel-Constantin Mierla writes:
>
> > It is similar with C 'switch' construct, but it uses 'sbreak' instead of 
> > C-'break', because in openser the keyword 'break' is already used for 
> > other meaning. I am not fully convinced whether to use this 'sbreak' 
> > keyword, or better 'esac' (shell-like), any better idea?
>
>since the language is changing anyway, why not introduce "return" that
>returns from a route block and then use break to beak from switch and
>possibly other statements you come up with.  then semantics would be the
>same as in c.
>  
>
this is an option, too. But I am afraid that some users will be scared 
when they will see that compatibility is broken and they will not easily 
test the development version using their old config file. Maybe a 
intermediary version that display warnings at startup that 'break' is 
obsolete and will be dropped soon in favor of 'return' would be better;

'esac' seems more appropriate to avoid more mess up between 'break' and 
'sbreak'.

Daniel

>-- juha
>
>  
>



More information about the Devel mailing list