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:

    Oh, what a catastrophe for man when he cut himself off from the rhythm of the year, from his unison with the sun and the earth. Oh, what a catastrophe, what a maiming of love when it was a personal, merely personal feeling, taken away from the rising and the setting of the sun, and cut off from the magic connection of the solstice and the equinox!
    —D.H. (David Herbert)

    A good marriage ... is a sweet association in life: full of constancy, trust, and an infinite number of useful and solid services and mutual obligations.
    Michel de Montaigne (1533–1592)