[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] shell: shexp-arith: also bring "I1=I2=10 I2=3; echo $(( I1, I2 ))" to bash
From: Steffen Nurpmeso <steffen () sdaoden ! eu>
Date: 2022-08-08 21:31:10
Message-ID: 20220808213110.VRCLl%steffen () sdaoden ! eu
[Download RAW message or body]
Hello!
Steffen Nurpmeso wrote in
<8629f1bb0471e00284eac7c61b06f9eea999ec1a.1659730455.git.steffen@sdaoden\
.eu>:
...
|You will not believe it, but now that i was reading over the mail
|i sent to busybox@ i saw a comma related bug in _op_apply(), and
|that lead me to another test, and that then to another fix even!
So please wait with that one, shall you already look at it.
On Sunday i thought about it and have to say it still has issues
for some of those conditions, for example 2 and 3 of these four,
s I1=I2=10 I3=I2+=1;p "<$((I1))>";e "<$I1><$I2><$I3>"
s I1=I2=10 I3=I2+=1;p "<$((I1,I3))>";e "<$I1><$I2><$I3>"
s I1=I2=10 I3=I2+=1;p "<$((I1+I3))>";e "<$I1><$I2><$I3>"
s I1=I2=10 I3=I2+=1;p "<$((I1?I1:I3))>";e "<$I1><$I2><$I3>"
and compared to how bash evaluates these constructs (
== WILD RECUR
<10><I2=10><10><I2+=1>
-<11><I2=10><11><I2+=1>
-<21><I2=10><11><I2+=1>
+<11><I2=10><10><I2+=1>
+<21><I2=10><10><I2+=1>
<10><I2=10><10><I2+=1>
): i will add more such recursive-evaluation-that-modifies-
following-constructs tests (of course: POSIX makes it unspecified
if a veriable contains anything else but solely a number, but
still), and once i have it going i will post a single changeset
again, ok?
Sorry for the noise, the problem just came to my mind when i was
reading the email that came back from busybox@, i had not seen it
before.
--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)
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic