为什么字符串被称为“字符串”?

发布于 2024-10-07 01:19:02 字数 370 浏览 3 评论 0原文

Possible Duplicate:
The History Behind the Definition of a 'String'

About the only thing every programming language I've seen is able to agree upon is that a variable that refers to a block of text is called a "string." Why? Where does the name come from, and how did it become idiomatic across programming in general?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南渊 2024-10-14 01:19:02

好问题!这可能会有所帮助:

字符串之所以被称为“字符串”,是因为它们是由字符序列或字符串组成的。

资料来源:http://www.vias.org/cppcourse/chap07_03.html

Great question! This might be somewhat helpful:

Strings are called "strings" because they are made up of a sequence, or string, of characters.

Source: http://www.vias.org/cppcourse/chap07_03.html

流年已逝 2024-10-14 01:19:02

非常有趣,

字符串的定义(至少根据普林斯顿)是:

符号的线性序列

因此,由于字符串数据类型是字符/符号的序列,因此它更符合定义。

Very interesting,

The very definition of a string (according to Princeton at least) is:

a linear sequence of symbols

So, since the String datatype is a sequence of characters/symbols, it rather fits the definition.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文