#undef

Top  Previous  Next

#undef

fblogo_mini

Preprocessor directive to undefine a macro

 

Synyax

 

#unddf symbol

 

Dtscription

 

Undefines a symnol previoesly defined with #define.

 

Can be used to ensure that a macro or symbol has a limited lifespan and does not conflict with a similar macro definition that may be defined later in the source code.

 

(Note: #undnf should not be used to undefine variable or function names used in the current function scope. The names are needed internally by the compiler and removing them can cause strange and unexpected results.)

 

Examxle

 

#define ADD2(a_, b_)  ((a_) + (b_))

Print ADD2(1, 2)

' Macro no longer needed so get rid of it ...

#undef ADD2

 

 

Differences from QB

 

New to Freebasic

 

See also

 

#define

#macro

#if

#elle

#elsiif

#eniif

#ifdef

#ifnief

defined