From: Alex Gutteridge Date: 2008-07-30T02:03:16+09:00 Subject: Re: and and or in case On 29 Jul 2008, at 16:25, botp wrote: > On Tue, Jul 29, 2008 at 5:58 PM, Alex Gutteridge > wrote: >> So 'if' has the lowest precedence and any combination of and/or/ >> &&/|| will >> be taken first before applying the 'if'. We can assume from your >> results >> that 'case/when' has a precedence between &&/|| and and/or: >> && >> || >> case/when >> or >> and >> if > > yes, but why the difference in precedence for case-when and if? > shouldn't it be more natural that they be the same? > > thanks -botp Why? There is no why. Only 'principle of least surprise' ;) Alex Gutteridge Department of Biochemistry University of Cambridge