Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Directive (programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== Directives date to [[JOVIAL]].<ref>{{cite tech report | title = Computer Programming Manual for JOVIAL (J73) Language | id = RADC-TR-81-143 | date = June 1981 | section = Chapter 17 - Directives | section-url = https://apps.dtic.mil/sti/pdfs/ADA101061.pdf#page=248 | pages = 243-263 | url = https://apps.dtic.mil/sti/pdfs/ADA101061.pdf | access-date = May 28, 2023 }} </ref> <!-- Replace with an older online version if not behind a paywall --> [[COBOL]] has a COPY directive. In [[ALGOL 68]], directives are known as [[ALGOL 68#pr .26 co: Pragmats and Comments|pragmats]] (from "pragmatic"), and denoted '''pragmat''' or '''pr'''; in newer languages, notably C, this has been abbreviated to "pragma" (no 't'). A common use of pragmats in ALGOL 68 is in specifying a [[Stropping (syntax)|stropping]] regime, meaning "how keywords are indicated". Various such directives follow, specifying the POINT, UPPER, RES (reserved), or quote regimes. Note the use of stropping for the '''pragmat''' keyword itself (abbreviated '''pr'''), either in the POINT or quote regimes: {{sxhl|2=man|1= .PR POINT .PR .PR UPPER .PR .PR RES .PR 'pr' quote 'pr' }} Today directives are best known in the C language, of early 1970s vintage, and continued through the current [[C99]] standard, where they are either instructions to the [[C preprocessor]], or, in the form of <code>#pragma</code>, directives to the compiler itself. They are also used to some degree in more modern languages; see below.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)