c++ - "pragma"这个词是怎么来的?

标签 c++ c terminology pragma

所以我知道 pragma 是什么以及它的用途,但是这个词本身的含义是什么?我在代码中多次使用它,但我从来不知道这个词的真正含义或代表什么。

最佳答案

根据描述 Ada 设计的美国政府拥有的 (!) 文件:Rationale for the Design of the Ada® Programming Language :

A pragma (from the Greek word meaning action) is used to direct the actions of the compiler in particular ways, but has no effect on the semantics of a program (in general).

我喜欢那里的(最后一个警告)......

这与在线希腊词典很好地交叉引用(例如,由 Martin York 引用)说 pragma(πράγμα,正如 asveikau 对原始问题的评论)means :

  1. 已经完成的事情、行为、既成事实
  2. 已完成或正在完成的工作
    1. 规范。商业,商业交易
  3. 事情、问题、事件
    1. 规范。在法医意义上,法律事务、案件、诉讼
  4. 存在或存在的事物,事物

似乎理解的关键是action这个词而不是信息

关于c++ - "pragma"这个词是怎么来的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3791259/

相关文章:

c - 这就是我在 Windows 中使自定义控件透明且无闪烁的方法吗?或者我的这些步骤之一是错误的?

c - 忽略 ANSI-C 项目头文件中的 C++ 关键字 - Netbeans IDE

rpc - 这是RPC协议(protocol)吗?

unicode - Unicode 中的 ‘combining characters’ 和 ‘grapheme extenders’ 有什么区别?

objective-c - "class method"和 "static method"有什么区别?

c++ - 给定复制构造的要求,如何在 C++11 中编写有状态分配器?

c++ - 在 C++ 中接近零方向的最佳方法

c++ - qmltestcase找不到c++类方法

c - 如何在 main.c 中使用另一个 .c 文件中定义的结构?

c++ - 使用 Hash Maps 表示一个非常大的数据源