boolean over multiple variables

strtr strtr at spam.com
Fri Jan 22 15:29:46 PST 2010


Simen kjaeraas Wrote:

> 
> Not tested, but they should work:
> 
> if ( anySame( var, a, b, c, d ) ) {
> }
> 
> if ( allSame( var, a, b, c, d ) ) {
> }
> 

A lot prettier.
I thought there would be a generic (basic) solution to this which I just didn't know about but maybe I actually do know the basics by now :)
> -- 
> Simen



More information about the Digitalmars-d-learn mailing list