For Programmers: Free Programming Magazines  


Home > Archive > Tcl > January 2006 > Re: proposal: reswitch









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: proposal: reswitch
Sektor van Skijlen

2006-01-27, 7:03 pm

Dnia 26 Jan 2006 20:07:37 -0800, Donald Arseneau skrobie:
> Fredderic <put_my_name_here@optusnet.com.au> writes:


[color=darkred]
> Sorry I haven't followed all the discussion, but has anybody proposed
> switch -all
> for multiple block execution, rather than a new exception type?


> switch -all -- $x {
> a { case for a }
> b { case for b }
> c { case for c }
> a -
> e -
> i -
> o -
> u { case for vowels }
> }


I would rather see:

switch ... {
...
a -or
b -or
c -or
d {
case for abcd
}
}

Also, for numbers there could be also ranges supported,
as gcc extension provides in form: case 0 ... 10:

switch ... {
0 -to 10 { ...

--
// _ ___ Michal "Sektor" Malecki <sektor(whirl)kis.p.lodz.pl>
\\ L_ |/ `| /^\ ,() <ethourhs(O)wp.pl>
// \_ |\ \/ \_/ /\ C++ bez cholesterolu: http://www.intercon.pl/~sektor/cbx
"I am allergic to Java because programming in Java reminds me casting spells"
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com