mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-22 20:01:31 +02:00
19941: fix (( 3, ))
This commit is contained in:
parent
aff4313b12
commit
d3b14e887e
@ -1,3 +1,8 @@
|
||||
2004-05-13 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* 19941: Src/math.c, Test/C01arith.ztst: (( x, )) triggered
|
||||
an internal bug instead of reporting an error.
|
||||
|
||||
2004-05-13 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 19936: Functions/Misc/zcalc: bad name for temporary history
|
||||
|
@ -168,8 +168,8 @@ static int prec[TOKCOUNT] =
|
||||
0, 16, 0
|
||||
};
|
||||
|
||||
#define TOPPREC 17
|
||||
#define ARGPREC (TOPPREC-1)
|
||||
#define TOPPREC 18
|
||||
#define ARGPREC 16
|
||||
|
||||
static int type[TOKCOUNT] =
|
||||
{
|
||||
|
@ -110,3 +110,23 @@
|
||||
print $(( ))
|
||||
0:empty math parse e.g. $(( )) acts like a zero
|
||||
>0
|
||||
|
||||
print $(( a = ))
|
||||
1:empty assignment
|
||||
?(eval):1: bad math expression: operand expected at `'
|
||||
|
||||
print $(( 3, ))
|
||||
1:empty right hand of comma
|
||||
?(eval):1: bad math expression: operand expected at `'
|
||||
|
||||
print $(( 3,,4 ))
|
||||
1:empty middle of comma
|
||||
?(eval):1: bad math expression: operand expected at `,4 '
|
||||
|
||||
print $(( (3 + 7, 4), 5 ))
|
||||
0:commas and parentheses, part 1
|
||||
>5
|
||||
|
||||
print $(( 5, (3 + 7, 4) ))
|
||||
0:commas and parentheses, part 1
|
||||
>4
|
||||
|
Loading…
Reference in New Issue
Block a user