Always block in task

In reply to Amit Kumar Mishra:

You need to read the first reply from Dave carefully and also should know what all procedural blocks are available in Verilog/System Verilog. Neither always nor initial are allowed in tasks. They are the blocks where your actual execution of the code takes place.