[Users] 'switch' statements

Daniel-Constantin Mierla daniel at voice-system.ro
Sun Jul 10 15:16:16 CEST 2005


Hello,

'switch' statements can be used now in configuration file to test the 
last returned code ('retcode') - CVS head version. This should simplify 
a lot the scripting for testing 'retcode' and should make the file 
better structured and easier to understand (hopefully :-) ).

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?

An example of usage is posted on dokuwiki page:
http://www.openser.org/dokuwiki/doku.php?id=openser_core_cookbook#switch

Daniel





More information about the Users mailing list