Re: Comma operator

2009-08-06 Thread John W. Krahn
Bryan R Harris wrote: A question about the comma operator: (John and Chas deserve a rest from my questions, if they want it =). The binary comma operator in scalar context supposedly "evaluates its left argument, throws that value away, then evaluates its right argument and returns

Re: Comma operator

2009-08-06 Thread Chas. Owens
On Thu, Aug 6, 2009 at 12:10, Bryan R Harris wrote: > > > A question about the comma operator: > > (John and Chas deserve a rest from my questions, if they want it  =). > > The binary comma operator in scalar context supposedly "evaluates its left > argument, throws th

Comma operator

2009-08-06 Thread Bryan R Harris
A question about the comma operator: (John and Chas deserve a rest from my questions, if they want it =). The binary comma operator in scalar context supposedly "evaluates its left argument, throws that value away, then evaluates its right argument and returns that value."

Re: comma operator

2002-03-14 Thread bob ackerman
een 'and' and '&&'. that is a bit of a gotcha for newbots. On Thursday, March 14, 2002, at 11:03 AM, Michael Fowler wrote: > On Thu, Mar 14, 2002 at 10:32:56AM -0800, bob ackerman wrote: >> confusion i have with comma operator. >> docs seem to indicate

Re: comma operator

2002-03-14 Thread Michael Fowler
On Thu, Mar 14, 2002 at 10:32:56AM -0800, bob ackerman wrote: > confusion i have with comma operator. > docs seem to indicate it evaluates both sides, but i see examples where it > looks like if it evaluates to false on LHS it doesn't evaluate RHS. i see > this in examples

RE: comma operator

2002-03-14 Thread Nikola Janceski
ssage- > From: bob ackerman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 14, 2002 1:37 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: comma operator > > > now what? i tried 'and' instead '&&' and it worked - last

Re: comma operator

2002-03-14 Thread bob ackerman
now what? i tried 'and' instead '&&' and it worked - last wasn't evaluated. that seems tricky to get right. i still don't understand why 'last' isn't always evaluated. On Thursday, March 14, 2002, at 10:32 AM, bob ackerman wrote: > confu

comma operator

2002-03-14 Thread bob ackerman
confusion i have with comma operator. docs seem to indicate it evaluates both sides, but i see examples where it looks like if it evaluates to false on LHS it doesn't evaluate RHS. i see this in examples of writing a case statement. $x='b'; { ($x eq 'a') && (pri