bug-bash
[Top][All Lists]
Advanced

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

Re: $(( )): binary/unary VAR/NUM inconsistency


From: Steffen Nurpmeso
Subject: Re: $(( )): binary/unary VAR/NUM inconsistency
Date: Wed, 06 Jul 2022 20:09:55 +0200
User-agent: s-nail v14.9.24-268-g937248580b

Andreas Schwab wrote in
 <87czeiqhb2.fsf@igel.home>:
 |On Jul 06 2022, Steffen Nurpmeso wrote:
 |
 |>   $ bash -c 'I=10; echo $((1++I)); echo $I'
 |>   bash: line 1: 1++I: syntax error in expression (error token is "++I")
 |>   $ bash -c 'I=10; echo $((1++1)); echo $I'
 |>   10
 |>
 |>   $ bash -c 'I=10;echo "<$(( +10+++I ))>"'
 |>   <21>
 |
 |A C compiler would parse all those expressions as post-increment applied
 |to a non-lvalue.

mumble

But i am happy the small hedgehog kid made it throught the winter,
all on his own!!  And came back with a girl friend: "Frühling!"
(Spring!), as if it is the simplemost thing on this earth!!
I now call him "Riccio", "mein wunderbarer Held!" ("Hedgehog, my
wonderful hero!").  Yes!!!  (I just hope he is always careful with
the many cars.  You know, these two legged are a real problem.)

--steffen
|
|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]