Actions

EmSys

CCoding Style - Magic Numbers

From EdWiki

Magic Numbers

  • Magic numbers are the constants, array sizes, character positions, conversion factors and other literal numeric values that appear in program.
  • Give names to magic numbers.
  • Define numbers as constants, not macros
  • Use character constants, not integers
  • Use the language to calculate the size of an object.