- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Unit2(ProgrammingLanguage)分析
Unit Two Programming Language Text A Functions in C Almost all programming languages have some equivalent of the function. You may have met them under the alternative names subroutine or procedure. Some languages distinguish between functions which return variables and those which dont 有些语言区分函数根据是否有返回值 C assumes that every function will return a value.If the programmer wants a return value, this is achieved using the return statement C假设每个函数将返回一个值.如果程序员希望返回值,这是通过使用返回语句实现的 If no return value is required, none should be used when calling the function.Here is a function which raises a double to the power of an unsigned, and returns the result. 如果不需要返回值,调用函数时不需要使用.这是一个定义了无符号的双精度型乘幂函数 The function follows a simple algorithm, multiplying the value by itself pow times. 该函数有如下一个简单的算法,乘以自身的幂次的值。 A for loop is used to control the number of multiplications, and variable ret_val stores the value to be returned for循环是用来控制数乘法次数的,而且ret_val变量的值保存返回值。 Careful programming has ensured that the boundary condition is correct too. Let us examine the details of this function 严谨的程序确保了边界条件是正确的.让我们来看看这个函数的详细信息 double power(double val, unsigned pow).This line begins the function definition. It tells us the type of the return value, the name of the function, and a list of arguments used by the function. 这行开始了函数的定义,它告诉我们,返回值的类型,函数的名称,以及由该函数使用的参数列表 The arguments and their types are enclosed in brackets, each pair separated by commas 参数和它们的类型包含在括号,用逗号分隔 The body of the function is bounded by a set of curly brackets. Any variables declared here will be treated as local unless specifically declared as static or extern types 函数体以一对花括号为界.声明的任何变量都将被认为是本身所有的除非是静态型或外部类型 return(ret_val);On reaching a return statement, control of the program returns to the calling function 一个返回语句,控制程序返回给调用函数 The bracketed value is the value which is returned from the function 括号内的值是由函数返回的值。 If the final closing curly bracket is reached before any return value, then the function will return automatically, any retu
您可能关注的文档
- UL310_2003中文版分析.doc
- UML弹幕视频网站分析.doc
- UML基础讲解分析.ppt
- 齐岳山隧道剖析.pptx
- UML类图符号简介分析.doc
- UI与交互设计分析.ppt
- UML练习题全分析.doc
- 鼠标市场调研剖析.pptx
- UG实体建模讲解分析.ppt
- UI设计毕业论文正文分析.doc
- Unit2Travelingaroundtheworld分析.docx
- Unit-3-Young-William-Shakespeare年轻的莎士比亚分析.ppt
- unit1_grammar_定语从句课件_新人教版必修2分析.ppt
- Unit2love新世纪大学英语分析.ppt
- unit2Introducingpeopletoeachother分析.pptx
- Unit1___my_name_is_gina第一单元我的名字叫吉娜分析.ppt
- unit2-this-is-my-sister这是我的姐姐分析.ppt
- Unit-9PPT分析.ppt
- ui视觉设计教案分析.pptx
- Unit3Computers分析.doc
最近下载
- 成人鼻肠管的留置与维护(2021团体标准解读)全文.pptx
- 【国家标准】国家职业技能标准 (2019年版) 起重装卸机械操作工.pdf VIP
- 小儿轮状病毒性肠炎护理ppt.pptx
- Pilon骨折精品课件.ppt VIP
- 中纺机集团对下属企业工资总额管理办法介绍.docx VIP
- 中国银行新疆区分行招聘笔试试题2024 .pdf VIP
- 2025中国银行新疆区分行社会招聘笔试备考题库及答案解析.docx VIP
- 2024电能计量装置典型设计低压用电客户.docx VIP
- 粗轧机AWC液压控制系统故障原因分析和改进.pdf VIP
- 2025年中国银行社会招聘备考试题及答案解析.docx VIP
文档评论(0)