Why are strings called "strings"? [duplicate]
Possible Duplicate:
The History Behind the Definition of a 'String'
About the only thing every programming language I've seen is able to a开发者_Go百科gree 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?
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
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.
精彩评论