based c

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rkgowda
    New Member
    • Apr 2007
    • 2

    based c

    what is d use of volatile in embedded systems,
    what is diff b/n macros & constant

    i am struct in these conscepts, help me


    ravi
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by rkgowda
    what is d use of volatile in embedded systems,
    what is diff b/n macros & constant

    i am struct in these conscepts, help me

    ravi
    When an lvalue is defined with the volatile qualifier the compiler is not allowed
    to optimize any reference or dereference away. Simply put: a volatile lvalue
    can be changed behind your back and you always want to update the lvalue
    asap and you always want the most up to date value from it.

    macros were used for constants before the 'const' keyword saw the light. They
    have not much in common though so their differences are huge.

    kind regards,

    Jos

    Comment

    Working...