From 8a4af211c346fd00ded0bb1b1384ca1514ed84e0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 12 Jun 2008 13:45:04 +0000 Subject: 25149: add C_PRECEDENCES option to make arithmetic have C/Perl precedence --- Test/C01arith.ztst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Test/C01arith.ztst') diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index 4e3585fd4..5179948bd 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -43,6 +43,16 @@ 0:precedence (arithmetic) >1591 + fn() { + setopt localoptions c_precedences + integer i + (( i = 4 - - 3 * 7 << 1 & 7 ^ 1 | 16 ** 2 )) + print $i + } + fn +0:precedence (arithmetic, with C_PRECEDENCES) +>259 + print $(( 1 < 2 || 2 < 2 && 3 > 4 )) 0:precedence (logical) >1 -- cgit 1.4.1