Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding STATIC

Former Member
0 Likes
342

Hi,

plz tell me what is static variable and static function ?

2 REPLIES 2
Read only

andreas_mann3
Active Contributor
Read only

Former Member
0 Likes
316

Hi ,

Static varaibles are varaibles that retain there value even after there scope is over . They are generally used in subroutines , generally varaibles defined in a subroutine do not retain/exist outside the subroutine , so each time the subroutine is called the variable is assigned the default value.

But if a variable is defined as static then it retains it value between subroutine calls e.g. if during call 1 the varaiable is assigned value 5 , then at the beginning of the next call also it will retain this value .

hope this helped

Regards

Arun