# Check syntax check execution

**URL:** <https://verificationacademy.com/forums/t/check-syntax-check-execution/40630>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, correct-code\
**Created:** [July 11, 2022, 3:21pm UTC](https://verificationacademy.com/forums/t/check-syntax-check-execution/40630 "2022-07-11T15:21:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_6](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@Mahesh\_6](https://verificationacademy.com/forums/u/Mahesh_6)\
**Post date:** [July 11, 2022, 3:21pm UTC](https://verificationacademy.com/forums/t/check-syntax-check-execution/40630/1 "2022-07-11T15:21:30Z")

</div>

HI All,

consider an example:

```verilog
  if ( value inside {0,1,2,3}) && 
        (flag1 == 0) ||  
        (value inside {5,6}) && 
        (flag2 == 1)
    	)begin

```

Here, value is 2:0 and can take any one value from 0 to 7.  
For simplication, I am representing the above code as

```verilog
if ( (exp1) &&
      (exp2) ||
      (exp3) &&
      (exp4)
   )

```

When exp1 is true, that is when value is between 0 and 3, exp3 cannot be true, that is we cannot check value for 5 or 6.  
Checking of exp3 is incorrect here, like a redundant.

Kindly let me know if my understanding is correct or not.

Thannk You

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [July 12, 2022, 11:22pm UTC](https://verificationacademy.com/forums/t/check-syntax-check-execution/40630/2 "2022-07-12T23:22:53Z")

</div>

_In reply to [Mahesh K](https://verificationacademy.com/forums/t/check-syntax-check-execution/40630):_

I’m not sure what you mean by “incorrect” without knowing what the correct behavior should be. What happens if values is 7?
