Magic Number (programming)

Magic Number (programming)

In computer programming, the term magic number has multiple meanings. It could refer to one or more of the following:

  • A constant numerical or text value used to identify a file format or protocol; for files, see List of file signatures
  • Distinctive unique values that are unlikely to be mistaken for other meanings (e.g., Globally Unique Identifiers)
  • Unique values with unexplained meaning or multiple occurrences which could (preferably) be replaced with named constants

Read more about Magic Number (programming):  Unnamed Numerical Constants, Magic GUIDs, Magic Debug Values

Famous quotes containing the words magic and/or number:

    We think of religion as the symbolic expression of our highest moral ideals; we think of magic as a crude aggregate of superstitions. Religious belief seems to become mere superstitious credulity if we admit any relationship with magic. On the other hand our anthropological and ethnographical material makes it extremely difficult to separate the two fields.
    Ernst Cassirer (1874–1945)

    In view of the fact that the number of people living too long has risen catastrophically and still continues to rise.... Question: Must we live as long as modern medicine enables us to?... We control our entry into life, it is time we began to control our exit.
    Max Frisch (1911–1991)