hi, can u tell me what is the meaning of this code? volatile BOOL GotSUD;

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khatereh
    New Member
    • Aug 2010
    • 1

    hi, can u tell me what is the meaning of this code? volatile BOOL GotSUD;

    what is the meaning of this code
    volatile BOOL GotSUD;
    BOOL Rwuen;
    BOOL Selfpwr;
  • Meetee
    Recognized Expert Contributor
    • Dec 2006
    • 928

    #2
    Code declares three variables with BOOL datatype. For data types please refer this

    volatile keyword indicates that GotSUD variable can be modified by a process which is outside the control of the compiler.

    Are you asking the same thing, right?

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Adding to what zodilla58 said:

      volatile means that the variable may be altered by means not in control of the compiler. Therefore, this is an instruction to your compiler to not make assumptions about this variable - like put it in a register or some other optimization. The compiler is to create an actual memory variable for this value.

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Finally (just to be clear), those three lines don't do anything. They define variables, but there is no executable code in that snippet.

        Comment

        Working...