Pragma
Noun · Development
Definitions
A directive that gives instructions to a compiler or interpreter about how to process code, rather than being part of the program's logic. The word comes from the Greek for deed and appears in ALGOL 68 and Ada before its best-known form, #pragma in C and C++. Common examples are #pragma once to stop a header being included twice, #pragma pack to control struct alignment, and #pragma omp parallel to parallelise a loop with OpenMP. Pragmas are implementation-defined, so a compiler that does not recognise one generally ignores it, which makes them useful for vendor extensions but also means a typo can fail silently. C99 added the _Pragma operator so pragmas can be produced by macros. Other languages borrow the term: Solidity uses pragma solidity to pin compatible compiler versions, and SQLite uses PRAGMA statements such as PRAGMA journal_mode=WAL to configure the database engine at runtime.
In plain English: A special instruction to the compiler or tool that says 'handle this file in a particular way' — it changes behavior without being part of the actual code logic.
Example: "#pragma once at the top of the header file prevents double-inclusion — simpler than include guards."