Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]


    In computer science, a value may be a number, literal string, array and anything that can be treated as if it were a number. In other words, label, subprogram, datatype, inheritance and control flow are not values in general. The exact definition varies across programming languages. Variables and subprogram calling sites are mostly treated as if they are values.
    The distinction from object is subtle but one can say that objects include the private memory storage referred to by targets of references while values are independent of storage and only contain public parts. For example, references are commonly expressed as values, notably a pointer in C programming language. In C, object references can be represented as a struct that contains a void pointer whose target structure is unknown to client code; the void pointer would refer
    to an object.

    The use of a term value is useful in clarifying the exact meaning of assignments, copying, and comparison of objects. In the value model, for instance, objects itself are copied instead of references to it, they are treated as if they were numbers.


        Value (computer science)
            In C: L-value and r-value
            In assembly language
            See also

    top

    In C: L-value and r-value
    Some languages use the idea of l-value and r-value. L-values are values that have addresses, meaning they are variables or dereferenced references to a certain place. R-value is either l-value or non-l-value — a term only used to distinguish from l-value. In C, the term l-value originally meant something that could be assigned (coming from left-value, indicating it was on the left side of the = operator), but since 'const' was added to the language, this now is termed a 'modifiable l-value'.

    An l-value is an expression that designates (refers to) an object. A non-modifiable l-value is addressable, but not assignable. A modifiable l-value allows the designated object to be changed as well as examined. An r-value is any expression that is not an l-value, it refers to a data value that is stored at some address in memory.

    top

    In assembly language
    A value can be virtually any kind of data by a given data type, for instance a string, a digit, a single letter.

    In assembly language there is something known as "immediate value", sometimes "immediate" for short; occasionally it can be written as "imm
      " where
        is a number indicating the size of the immediate value, so imm8 would refer to an immediate byte size value. An immediate value is a number, either written with digits or as a string" "mnemonic 'A'" could be the same as "mnemonic 0x64"; the byte order of strings differs depending on the assembler and architecture.

    top

    See also
     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    MIT OpenCourseWare
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "Value (computer science)". link