所以我知道 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 :
- 已经完成的事情、行为、既成事实
- 已完成或正在完成的工作
- 规范。商业,商业交易
- 事情、问题、事件
- 规范。在法医意义上,法律事务、案件、诉讼
- 存在或存在的事物,事物
似乎理解的关键是action这个词而不是信息。
关于c++ - "pragma"这个词是怎么来的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3791259/