# What is the exact difference between static tasks/functions and automatic tasks/functions ? please explain with a clear example

**URL:** <https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog\
**Created:** [September 9, 2015, 10:45am UTC](https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014 "2015-09-09T10:45:53Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![cuonghle](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/cuonghle/32/3231_2.png) [@cuonghle](https://verificationacademy.com/forums/u/cuonghle)\
**Post date:** [January 9, 2018, 7:40am UTC](https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014/19 "2018-01-09T07:40:07Z")

</div>

_In reply to [tejal vernekar](https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014/18):_

> _In reply to [dave\_59](https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014/18):_  
> But for static lifetime, we need to use task static add(int a,int b)  
> By default it will have automatic lifetime

Keep in mind, task/function in module is always static at the fault. task/function in class is always automatic at default.

---

_[View the full topic](https://verificationacademy.com/forums/t/what-is-the-exact-difference-between-static-tasks-functions-and-automatic-tasks-functions-please-explain-with-a-clear-example/31014)._
