#0 statements

as per my understanding #0 statements will executing in in-active region of event queue And $display will executing in active region.
Now come to the below code, first the #0 statement is completed in “in-active region” after that $display.

module main();
  bit a;
initial
begin
      #0 a = 1'b1;
         $display("a = %b",a);
  end
endmodule

how the display is recorded the “a” value because of display will completed in active region?

In reply to anvesh dangeti:

Within a begin/end block, each statement executes in serial order, regardless of any region.

Nothing executes in the inactive region. What happens is the #0 executes as part of the active region, and that suspends the initial block process by placing it on the inactive queue. Once the current active queue of events is empty, the inactive queue becomes the active queue and execution of those events continue.

I got you are point. But as per initial block all statements will execute in serial order.
i.e. first #0 statement will complete in “in-active region”. Next the display will execute in active region. But active region doesn’t having updated "a’ values than how display will recorded that updated “a” value.

like non-blocking assignments evaluation is done in active region and assignment will done in NBA region of event queue. That’s why display only will record what are the values is there in active region.it will not record the NBA region values.

In reply to anvesh dangeti:

In a blocking assignment statement, the statement is not complete until updating the LHS. When the next statement executes, “a” has been updated. The #0 or any other delay is irrelevant.