C ++标准中Should和Shall的确切含义 [英] Exact meanings of Should and Shall in the C++ standard

查看:108
本文介绍了C ++标准中Should和Shall的确切含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在审查C ++标准03版本.我开始对 应该 应该 这两个词的含义感到困惑.

I've been reviewing the C++ standard 03 version. And I'm beginning to get confused with the meanings of the words Should and Shall.

似乎表示强制性要求(必须具备),而标准中的应该似乎指示了可选要求(必须具有).用英语, 应该 表示期望,我误解了意思吗? 可以 代替吗?

Shall in the standard seems to indicate a compulsory requirement (will-have), where as Should in the standard seems to indicate an optional requirement (could-have). In English, Should implies an expectation, have I misunderstood the meaning? shouldn't Could be used instead?

推荐答案

从ISO TR 10176开始,信息技术–编写编程语言标准的指南:

From ISO TR 10176, Information technology – Guidelines for the preparation of programming language standards:

3.7 本文中使用的辅助动词

3.7.1 :
表示对编程语言标准或处理器的要求.

3.7.1 shall:
An indication of a requirement on programming language standard or processors.

3.7.2 应该:
指示对编程语言标准或处理器的建议.

3.7.2 should:
An indication of a recommendation to programming language standard or processors.

3.7.3 可能:
指示编程语言标准或处理器的可选功能.当本技术报告向支持特定可选功能的编程语言标准提供建议时,在说明条件的句子中使用辅助动词"may".

3.7.3 may:
An indication of an optional feature of programming language standard or processors. When this Technical Report provides a recommendation to the programming language standard that supports a specific optional feature, the auxiliary verb "may" is used in the sentence explaining the condition.

这是从2002修订版开始的,当前的修订版是2003,但是我认为它并没有太大变化.(当前修订版的价格似乎为150欧元,有点陡峭.我在这里找到了2002修订版:

This is from the 2002 revision, the current revision is 2003, but I assume it hasn't changed much. (The current revision appears to be available for 150 euros, a bit steep. I found the 2002 revision here: http://std.dkuug.dk/jtc1/sc22/wg20/docs/n970-tr10176-2002.pdf.)

这篇关于C ++标准中Should和Shall的确切含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆