Introduction
A .inc file is a piece of source code that another file pulls in. It is not a
format of its own: the extension only says “include me”, and the contents are in whatever
language the including file uses. Shared constants, macros and declarations are the usual
contents.
Structure
The file is plain text, in the syntax of its language. These are the common uses:
| Language or tool | How it is included | What to look for |
|---|---|---|
| Assembly (NASM, MASM, TASM) | %include or include | Lines of mnemonics, equ constants, ; comments |
| Pascal and Delphi | {$I name.inc} | {$ compiler directives, procedure, begin |
| PHP | include or require | <?php |
| C and C++ | #include | #define, lines ending in ; |
| Fortran | INCLUDE | COMMON blocks, PARAMETER |
| HTML, ASP and server-side includes | <!--#include --> | Tags |
| POV-Ray | #include | Scene description |
| BitBake | require or include | Recipe variables |
Nothing in the file marks which of these it is. The file viewer on this site reads the text and judges from its shape: PHP from its opening tag, assembly from lines of mnemonics, and Pascal or C from which of them finds more of its own words. It colours the file to match and says what it decided. Where nothing reads well, the file is shown plain.