Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importance of using macro STATIC

Tags:

c

syntax

static

I have some legacy code, which uses the macro definition as

#ifdef def_STATIC
#define STATIC static
#else
#define STATIC
#else
#endif

I understand using STATIC will help limiting the scope of variables depending on def_STATIC but in what cases is this practice used ? How is it helpful ?

like image 599
Bleamer Avatar asked Sep 30 '13 13:09

Bleamer


People also ask

What is the importance of static in economics?

Static economics gives knowledge of the conditions of equilibrium. It tells that price is determined where demand for the supply of goods is equal. Similarly, income is in equilibrium where planned investment and planned savings are equal.

What is the importance of macro analysis?

Macro environment analysis is part of a company's strategic management that enables it to analyze and identify potential opportunities and hazards that might impact the business. The goal is to prepare management in advance with information that assists them in making operational decisions.

What is the main difference between macro statics and comparative macro statics?

Comparative macro-statics tries to establish the relationship between two different interconnected macroeconomic variables in two different macro static positions. It means a comparative study between two different macro static positions is the subject matter of comparative macro statics.

What does static analysis mean in economics?

Definition: Static Economics • Prof. Schumpeter defined static analysis as “a method of dealing with economic phenomena that tries to establish relations between elements of economic system, prices and quantities of commodity, all of which refer to the same point of time.” • According to Prof.


1 Answers

I have never faced such macro myself, but according to this: "XFS removal of #define STATIC static" source it was used to disable static functions because GDB couldn't properly debug static inline functions. That's why this macro was used to temporarily make them non-static.

Correct me if I'm wrong, I've just googled it :) An interesting question really)

like image 121
FreeNickname Avatar answered Sep 28 '22 18:09

FreeNickname