syntax idea: simplifed ifs
Derek Parnell
derek at psych.ward
Mon Apr 10 15:17:31 PDT 2006
On Tue, 11 Apr 2006 08:04:21 +1000, dennis luehring <dl.soluz at gmx.net>
wrote:
> for example how often do we use constructs like
>
> if( x == 10 && x == 20 && x == 30 )
>
> simplified:
> if( x == [10 && 20 && 30] )
>
> if( a >= h && b >= h && c >= h )
>
> simplified:
> if( [a && b && c] >= h )
>
> (just an idea)
A good one too, in my opinion. The || symbol would also be useful.
if ( [a || b || c] >= h )
--
Derek Parnell
Melbourne, Australia
More information about the Digitalmars-d
mailing list