1 From: Tony Balinski <ajbj@free.fr>
2 Subject: Allow easy negative testing of array index inclusion
4 This patch provides the composite operator "! in" (for "not in"), which
5 can be used in array tests. This allows the current negative test
7 if (!(index in theArray)) ...
11 if (index !in theArray) ...
13 The Enhancements to NEdit macro parsing patch includes this small change.
17 source/parse.y | 4 ++++
18 1 file changed, 4 insertions(+)
20 diff --quilt old/source/parse.y new/source/parse.y
21 --- old/source/parse.y
22 +++ new/source/parse.y
23 @@ -575,10 +575,14 @@ numexpr: NUMBER {
24 ADD_OP(OP_DECR); ADD_OP(OP_ASSIGN); ADD_SYM($1);
26 | numexpr IN numexpr {
29 + | numexpr NOT IN numexpr {
30 + ADD_OP(OP_IN_ARRAY);
35 $$ = GetPC(); StartLoopAddrList();