Name:
#ifndef
Syntax:

#IFNDEF label

(code)

#ENDIF


#IFNDEF label

(code)

#ELSEIFNDEF label2

(code)

#ELSE

(code)

#ENDIF

Description:

Conditionally compile code depending on whether a label is not defined (#ifndef) or is defined (#ifdef).

Applies To:
All
See Also:
Related Create:
    Share:
    Print:

    #ifndef example

    Example of how to use #define and #ifndef

    Code Example:
    #define clock8
    
    #ifdef clock8
      let b1 = 8
    #else
      let b1 = 4
    #endif
    
    #undefine clock8
    
    #ifndef clock8
      let b2 = 4
    #else
      let b2 = 8
    #endif
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.