- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
(程式语言)
Programming Language(程式語言) Chapter 6 Data Types (資料型態) Topics Introduction Primitive data types (基本資料型態) Character string types (符號字串型態) User-defined ordinal types (使用者定義順序型態) Array types (陣列型態) Associative arrays (關聯陣列) Record types (紀錄型態) Union types (聯合型態) Pointer and reference types (指標與參考型態) Introduction Data type defines A collection of data objects and a set of predefined operations on those objects一群資料物件與再這物件上被預先定義運算集合 Primitive Data Types Almost all programming languages provide a set of primitive data types Primitive data types Those not defined in terms of other data types沒有被定義再其他的資料型態中 Some primitive data types are merely (只是) reflections (反映) of the hardware Integer type Others require (需要) only a little non-hardware Integer The most common privative numeric (數字的) data type is integer Java’s signed integer sizes byte, short, int, long C++ and C# include unsigned integer types Unsigned types are often used for binary data Floating Point Model real numbers, but only as approximations (近似值) Languages for scientific (科學) use support at least two floating-point types Float and double IEEE Floating-Point Standard 754 IEEE Standard 754 Floating-Point Decimal (10進位) For business applications (money) Essential (基本) to COBOL C# offers a decimal data type Store a fixed number of decimal digits Advantage Accuracy (準確) Disadvantages Limited range (有限的範圍) Wastes memory (消耗記憶體) Boolean Simplest (最簡單) of all Range of values: two elements True False Could be implemented as bits, but often as bytes Advantage Readability Character (字元) Stored as numeric (數值) codings Most commonly used coding: ASCII An alternative, 16-bit coding: Unicode Includes characters from most natural languages Originally used in Java C# and JavaScript also support Unicode Character String Types Values are sequences of characters Design issues Should strings be simply a special kind of character array or a primitive type? Should strings have static or dynamic length? Character String Types Op
您可能关注的文档
最近下载
- 领读经典-外国文学(1)(山东大学)中国大学MOOC慕课 章节测验期末考试客观题答案.docx VIP
- 《电机与拖动基础》课件(共十一章).ppt VIP
- 《PyTorch与深度学习实战》第2章 PyTorch深度学习通用流程.pptx VIP
- 简谱D 想着我Think of Me简谱歌剧魅影.pdf VIP
- 2023-2024学年安徽省马鞍山市第八中学九年级上学期期中考试化学试卷.pdf VIP
- 《PyTorch与深度学习实战》第3章 PyTorch深度学习基础.pptx VIP
- 好书推荐《朝花夕拾》读书分享名著导读PPT课件.pptx VIP
- 22个专业95个病种中医临床诊疗方案目录44.pdf VIP
- 精品解析:天津市第四十三中学2024-2025学年高一上学期第一次月考英语试题(解析版).docx VIP
- 2025年北京市东城区九年级初三一模语文试卷(含答案).docx
文档评论(0)