Directive (programming): Difference between revisions

Content deleted Content added
simplify
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Clarify}}
Line 1:
In [[computer programming]], a '''directive''' '''pragma''' (from "pragmatic") is a [[language construct]] that specifies how a [[compiler]] (or other [[Translator (computing)|translator]]) should process its input. Directives are not part of the [[Formal grammar|grammar]]{{clarify|sentence is contradicting itself by claiming it is a construct, part of the grammar, while also saying it's not part of the grammar|date=January 2017}} of a [[programming language]], and may vary from compiler to compiler. They can be processed by a [[preprocessor]] to specify compiler behavior, or function as a form of [[In-band signaling|in-band]] parameterization.
 
In some cases directives specify global behavior, while in other cases they only affect a local section, such as a block of programming code. In some cases, such as some C pragmas, directives are optional compiler hints, and may be ignored, but normally they are prescriptive, and must be followed. However, a directive does not perform any action in the language itself, but rather only a change in the behavior of the compiler.