From: Rolando Abarca Date: 2008-05-15T03:15:00+09:00 Subject: Re: anding statements. On May 14, 2008, at 2:04 PM, Michael Linfield wrote: > Kyle Schmitt wrote: >> Mac, >> If your two arguments were methods however, and the first one >> succeeded, wouldn't you expect it to execute the second? >> >> On Wed, May 14, 2008 at 12:17 PM, Michael Linfield > > Alright I'm going to attempt to explain this without confusing you or > myself. > > Using '&' is basically comparing. It returns a value if not false. > > 1 & 2 #=> 0 > 2 & 2 #=> 2 AFAIR, '&' is a bitwise and operator: 1 & 2 -> 0 because 0b01 & 0b10 == 0b00 2 & 2 -> 2 because 0b10 & 0b10 == 0b10 1 & 3 -> 1 because 0b01 & 0b11 == 0b01 no boolean operations are done here. regards, -- Rolando Abarca M.