#define located on stack / in flash

Hi,

is it true that #define directives are located on the stack (or in the flash)?

#define TEST  "ein text"

Or is it much better to use

static unsigned char[] = "ein text";


variables?

many thanks for your answers

Peter

Parents
  • "is it true that #define directives are located on the stack (or in the flash)?"

    No - as Zeusti says, that is complete nonsense!

    #defines are exclusively in the domain of the preprocessor.

    "Or is it much better to use..."

    "Better" is meaningless unless you state your objectives!

    Obviously, #defines have advantages in some situations - but whether they are advantageous in your particular situation is, clearly, impossible to say without knowing your situation!

    So: what is it, exactly, that you are trying to achieve?

Reply
  • "is it true that #define directives are located on the stack (or in the flash)?"

    No - as Zeusti says, that is complete nonsense!

    #defines are exclusively in the domain of the preprocessor.

    "Or is it much better to use..."

    "Better" is meaningless unless you state your objectives!

    Obviously, #defines have advantages in some situations - but whether they are advantageous in your particular situation is, clearly, impossible to say without knowing your situation!

    So: what is it, exactly, that you are trying to achieve?

Children
More questions in this forum