May 08, 2004 Select statement? | ||||
---|---|---|---|---|
| ||||
I have a suggestion: let's include in D a select statement with non-static conditions: seclect () { case a < b: .... break; case sin(k) < cos(b): .... break; case str == "12345": .... break; case default: .... break; } which is equivalent to if - else if - else block, but in some cases more compact and understandable. I would not mind if instead of select another keyword would be used :) Regards. |
May 09, 2004 Re: Select statement? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lev Elbert | You're posting on the wrong group. Try news://news.digitalmars.com/digitalmars.D "Lev Elbert" <elbertlev@comcast.net> wrote in message news:c7jp6o$2m1i$1@digitaldaemon.com... > I have a suggestion: let's include in D a select statement with non-static conditions: > > seclect () > { > case a < b: > .... > break; > case sin(k) < cos(b): > .... > break; > case str == "12345": > .... > break; > case default: > .... > break; > } > > which is equivalent to if - else if - else block, but in some cases more compact and understandable. > > I would not mind if instead of select another keyword would be used :) Regards. > > |
Copyright © 1999-2021 by the D Language Foundation