From: dblack@... Date: 2002-11-20T05:29:51+09:00 Subject: Re: difference between "and" and "&&" Hi -- On Wed, 20 Nov 2002, Volkmann, Mark wrote: > I thought the only difference between these was precedence, but I'm seeing > another difference. > > a = 'test' > b = nil > haveBoth = a and b > # haveBoth is now equal to 'test' > > haveBoth = a && b > # haveBoth is now equal to nil > > Is this the expected behavior? Yes. The first one is equivalent to: (haveBoth = a) and b The second is: haveBoth = (a && b) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav