[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arithmetic expression: recursive VAR evaluation suppresses desired V

From: Steffen Nurpmeso
Subject: Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment
Date: Thu, 11 Aug 2022 16:22:12 +0200
User-agent: s-nail v14.9.24-284-gd57ba63239

Greg Wooledge wrote in
 |On Thu, Aug 11, 2022 at 04:04:57PM +0200, Steffen Nurpmeso wrote:
 |> Hm.  Well i agree that precedence rules which loose a construct
 |> completely (in that =5 is lost in I=5?I:J) is weird, but other
 |What's that even supposed to *be*?  You're assigning I=5 and then
 |checking whether the assignment actually worked?
 |If you intended it to be   i==5 ? i : j   then you really ought to
 |put some parentheses in it, so people like me who haven't memorized
 |the C precedence rules for decades won't have to dig up a manual to
 |figure out whether it's   (i==5) ? i : j   or   i == (5 ? i : j).

It is part of a test script, and the thing tested is actually
recursive expansion.  Aka, that it does not happen when an
assignment is performed.  More precisely, an expansion that
modifies settings that affect further expansions.
I am not subscribed to this list btw.  Thank you.

|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]