Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Significance of Static n2 as an Integer in VB
Significance of Static n2 as an Integer in VB
Declare a static n2 integer function

Integer is defined as an integer variable, and there are long double float and so on. After all, it's simple without explanation.

Static static function

A function can be defined as a static function by adding the static keyword before its return type. Static function is different from ordinary function, it can only be seen in the file that declares it and cannot be used by other files.

Divided into:

1 global static function, defined outside the function body, is used globally by the program, which is no different from the commonly defined function, except that it cannot boast page access.

2 Local static function, defined in the function body, which is generally used for timer accumulation. After all, it is common, as shown below.

This example demonstrates the use of a function. Static means that even if the function exits, the value of the function will be recorded and loaded next time.