Operators precedence

This test case it part of the test suite proposed for new devices.

Test case ID: R0028
Language: ST

Code:
tests2/t0028.st

PROGRAM Test_R0140


VAR
    (* Primitive data types *)
    I : INT;
    B1,B2,B3,B4 : BOOL;
    W1, W2,W3,W4,W5,W6 : WORD;
    X,Y,Z : REAL;
END_VAR
    
    W1 := WORD#16#FF;
    W2 := WORD#16#0F;
    W3 := WORD#16#01;
    W4 := WORD#16#02;
    
    W5 := W1 AND W2 OR W3 AND W4;  //  (FF & 0F) | (01 &02) = 0F
    W6 := (((W1 AND W2) OR W3) AND W4);  // 2
    
    X := 5.0*2.0**3.0;  //  5* 2^3  = 5*8=40

_GEB_ASSERT_(W5 = 16#f);
_GEB_ASSERT_(W6 = 2);
_GEB_ASSERT_EQFLOAT_(X, 40.0);

END_PROGRAM