Skip to content

v1.3.5

Latest

Choose a tag to compare

@ryuichiueda ryuichiueda released this 28 Nov 06:47
· 6 commits to main since this release

Fixed a bug in the calculator logic

We corrected the independence of operations on either side of the comma.

### before (The right and left sides of the comma are evaluated SEPARATELY.):  ###
🍣 a=0 ; ((a++ , a<1 )) ; echo $?
0              # <---- It must be one.
### after: ###
🍣 a=0 ; ((a++ , a<1 )) ; echo $?
1

Thanks

We noticed this bug when we tired an example in this book. This book is very useful. Now, it works.

🍣 fib='i++, F[i]=F[i-1]+F[i-2], i<20 && fib'
🍣 ((i=1, F[0]=0, F[1]=1, fib))
🍣 echo ${F[@]}
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765

Full Changelog: v1.3.4...v1.3.5