File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 2020-06-22 Peter Stephenson <p.stephenson@samsung.com>
2+
3+ * 46079: Src/math.c, Test/C01arith.ztst: Ignore double quotes in
4+ math expression: treat as white space.
5+
162020-06-22 Manuel Jacob <me@manueljacob.de>
27
38 * 46091: Doc/Zsh/contrib.yo,
Original file line number Diff line number Diff line change @@ -831,6 +831,8 @@ zzlex(void)
831831 case ' ' : /* Fall through! */
832832 case '\t' :
833833 case '\n' :
834+ case '"' : /* POSIX says ignore these */
835+ case Dnull :
834836 break ;
835837 default :
836838 if (idigit (* -- ptr ) || * ptr == '.' )
Original file line number Diff line number Diff line change 1801801:bases beyond 36 don't work
181181?(eval):1: invalid base (must be 2 to 36 inclusive): 37
182182
183+ fail=39
183184 print $(( 3 + "fail" ))
184- 1:parse failure in arithmetic
185- ?(eval):1: bad math expression: operand expected at `"fail" '
185+ 0:Double quotes are not treated specially in arithmetic
186+ >42
186187
187188 alias 3=echo
188189 print $(( 3 + "OK"); echo "Worked")
487488 let noexist==0 )
4884891:Arithmetic, NO_UNSET part 3
489490?(eval):2: noexist: parameter not set
491+
492+ print $(( "6+2" / "1+3" ))
493+ 0:Double quotes are not treated specially in arithmetic (POSIX)
494+ # and do not do grouping! this is 6 + (2/1) + 3
495+ >11
You can’t perform that action at this time.
0 commit comments