Name:
#define
Syntax:

#DEFINE label

Description:

Defines a label to use in a #ifdef or #ifndef statements.

Do not confuse the use of '#define' and 'symbol =' '#define' is a directive and, when used with #ifdef, determines which sections of code are going to be compiled. ‘symbol = ’ is a command used within actual programs to re-label variables and pins.

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

    Title

    Description

    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.

    Comments

    • Login to leave a comment.