Directive (programming): Difference between revisions

Content deleted Content added
The C preprocessor: Add a sentence about the C++20 module directives
History: COBOL; JOVIAL
Line 19:
 
==History==
Directives date to [[JOVIAL]].<ref>{{cite techreport
Directives date to [[ALGOL 68]], where they 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').
| 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]] Had a COPY directive.
 
DirectivesIn date to [[ALGOL 68]], where theydirectives 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: