Real-world problems usually require the storage, retrieval, and manipulation of related data. If data are related, then it makes sense to keep them collected together. A real data set could be, say, the names of people in a tutorial group. It would be possible to use scalar variables to represent each individual in the group, but this would mean maintaining many separate variables, an overly complex and definitely more error-prone approach. Grouping each value into a set makes more sense, and this is where the array data type comes in.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Arrays

  • Paul Tregoing

摘要

Real-world problems usually require the storage, retrieval, and manipulation of related data. If data are related, then it makes sense to keep them collected together. A real data set could be, say, the names of people in a tutorial group. It would be possible to use scalar variables to represent each individual in the group, but this would mean maintaining many separate variables, an overly complex and definitely more error-prone approach. Grouping each value into a set makes more sense, and this is where the array data type comes in.