%description: Test operator precedence, associativity, recursive expression, etc. %file: test.ned simple Test { parameters: @isNetwork(true); double p00 = 2 * 2 + 2; double p01 = 2 + 2 * 2; double p02 = 2 * (2 + 2); double p03 = (2 + 2) * 2; double p04 = 1 << 2 << 3; double p05 = (1 << 2) << 3; double p06 = 1 << (2 << 3); double p07 = int(false && false || true); double p08 = int(true || false && false); double p09 = int(false && (false || true)); double p10 = int((false || true) && false); int i1 = 1; string a1 = i1==1 ? "one" : (i1==2 ? "two" : (i1==3 ? "three" : "big")); string b1 = i1==1 ? "one" : i1==2 ? "two" : i1==3 ? "three" : "big"; int i2 = 2; string a2 = i2==1 ? "one" : (i2==2 ? "two" : (i2==3 ? "three" : "big")); string b2 = i2==1 ? "one" : i2==2 ? "two" : i2==3 ? "three" : "big"; int i3 = 3; string a3 = i3==1 ? "one" : (i3==2 ? "two" : (i3==3 ? "three" : "big")); string b3 = i3==1 ? "one" : i3==2 ? "two" : i3==3 ? "three" : "big"; int i4 = 4; string a4 = i4==1 ? "one" : (i4==2 ? "two" : (i4==3 ? "three" : "big")); string b4 = i4==1 ? "one" : i4==2 ? "two" : i4==3 ? "three" : "big"; } %file: test.cc #include using namespace omnetpp; namespace @TESTNAME@ { class Test : public cSimpleModule { public: Test() : cSimpleModule(16384) { } virtual void activity() override; }; Define_Module(Test); void Test::activity() { for (int i=0; i