3 ms·
No one seems to be mentioning another use of the phrase "magic number" which isn't bad at all - numbers put in files to mark the file type. 0xCAFEBABE in java
by dllthomas 13y ago
No one seems to be mentioning another use of the phrase "magic number" which isn't bad at all - numbers put in files to mark the file type. 0xCAFEBABE in java class files, for instance.
- greenyoda 13y agoUnix even has "man 5 magic", which describes the format of the magic numbers file that the "file" command uses to determine the type of a file (executable, object code, shell script, etc.) from its first few characters. My personal favorite magic numbers are the values that debuggers use to fill uninitialized memory, like 0xDEADBEEF, 0xBAADF00D, etc. Wikipedia has a good article on magic numbers: https://en.wikipedia.org/wiki/Magic_number_(programming) https://en.wikipedia.org/wiki/Magic_number_(programming)