From f6ab9a281dde719e180809db52d0d142d0c0a240 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 3 Apr 2017 10:03:13 +0100 Subject: 40932: Parameter subscripts need to count parentheses. Otherwise they can terminate in the middle of an expression. --- Test/D06subscript.ztst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Test') diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst index 144923667..f0a858b1c 100644 --- a/Test/D06subscript.ztst +++ b/Test/D06subscript.ztst @@ -266,3 +266,10 @@ >of the gang >of the gang >of the gang + + string='abcde' + twoarg() { return $(( $2 - $1 )) } + functions -M twoarg + print ${string[1,twoarg(1,4)]} +0:Commas inside parentheses do not confuse subscripts +>abc -- cgit 1.4.1