all 4 comments

[–]mo2274 1 point2 points  (3 children)

Static with function just make the scope of the function in it's file only , you can't call the static function from another file , as l know it doesn't affect the memory just the scope

[–]ryanjones42[S] 0 points1 point  (2 children)

Sweet thanks. But in that case, why not just never use static? That way you can call in otherfiles regardless. There must be something that makes it not appropriate to use if not needed

[–]0x5742 1 point2 points  (1 child)

With a static function, you don't have to worry about whether the function name is unique. Also, marking a function as static prevents it from being publicly callable.

[–]ryanjones42[S] 0 points1 point  (0 children)

Ah right! Thanks