(程式语言).ppt

(程式语言).ppt

ID:48810477

大小:448.00 KB

页数:49页

时间:2020-01-27

(程式语言).ppt_第1页
(程式语言).ppt_第2页
(程式语言).ppt_第3页
(程式语言).ppt_第4页
(程式语言).ppt_第5页
资源描述:

《(程式语言).ppt》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、ProgrammingLanguage (程式語言)Chapter6DataTypes(資料型態)TopicsIntroductionPrimitivedatatypes(基本資料型態)Characterstringtypes(符號字串型態)User-definedordinaltypes(使用者定義順序型態)Arraytypes(陣列型態)Associativearrays(關聯陣列)Recordtypes(紀錄型態)Uniontypes(聯合型態)Pointerandreferencetypes(指標與參考型態)2IntroductionDa

2、tatypedefinesAcollectionofdataobjectsandasetofpredefinedoperationsonthoseobjects一群資料物件與再這物件上被預先定義運算集合3PrimitiveDataTypesAlmostallprogramminglanguagesprovideasetofprimitivedatatypesPrimitivedatatypesThosenotdefinedintermsofotherdatatypes沒有被定義再其他的資料型態中Someprimitivedatatypesarem

3、erely(只是)reflections(反映)ofthehardwareIntegertypeOthersrequire(需要)onlyalittlenon-hardware4IntegerThemostcommonprivativenumeric(數字的)datatypeisintegerJava’ssignedintegersizesbyte,short,int,longC++andC#includeunsignedintegertypesUnsignedtypesareoftenusedforbinarydata5FloatingPoin

4、tModelrealnumbers,butonlyasapproximations(近似值)Languagesforscientific(科學)usesupportatleasttwofloating-pointtypesFloatanddoubleIEEEFloating-PointStandard7546IEEEStandard754Floating-Point(單精確度)(倍精確度、雙精確度)7Decimal(10進位)Forbusinessapplications(money)Essential(基本)toCOBOLC#offersade

5、cimaldatatypeStoreafixednumberofdecimaldigitsAdvantageAccuracy(準確)DisadvantagesLimitedrange(有限的範圍)Wastesmemory(消耗記憶體)8BooleanSimplest(最簡單)ofallRangeofvalues:twoelementsTrueFalseCouldbeimplementedasbits,butoftenasbytesAdvantageReadability9Character(字元)Storedasnumeric(數值)coding

6、sMostcommonlyusedcoding:ASCIIAnalternative,16-bitcoding:UnicodeIncludescharactersfrommostnaturallanguagesOriginallyusedinJavaC#andJavaScriptalsosupportUnicode10CharacterStringTypesValuesaresequencesofcharactersDesignissuesShouldstringsbesimplyaspecialkindofcharacterarrayorapr

7、imitivetype?Shouldstringshavestaticordynamiclength?11CharacterStringTypesOperationsTypicaloperationsAssignmentandcopyingComparison(=,>,etc.)Catenation(串接)Substringreference(子字串參考)Patternmatching(樣式匹配)12CharacterStringTypeinCertainLanguagesCandC++Notprimitive(基本)Usechararraysa

8、ndalibraryoffunctionsthatprovideoperationsJavaPrimitiveviatheStringc

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。