Repository navigation
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 $?
1Thanks
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 6765Full Changelog: v1.3.4...v1.3.5