- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
CHAPTER 9Iteration Beyond the Basic PERFORM.PPT
Structured COBOL Programming, Stern Stern, 9th Edition CHAPTER 9Iteration: Beyond the Basic PERFORM OBJECTIVES To familiarize you with: 1. The simple PERFORM. 2. How PERFORM statements are used for iteration. 3. The various options available with the PERFORM statement. The Simple PERFORM Reviewed The Basic Formats There are two formats of the basic PERFORM: 1. In-Line PERFORM PERFORM Statements to be executed END-PERFORM The Basic Formats 2. PERFORM Paragraph-Name PERFORM [paragraph-name-1]control returns to this statement The PERFORM paragraph-name statement will: 1. Execute all instructions in the named paragraph. 2. Transfer control to the next instruction in sequence, after the PERFORM paragraph-name. The Basic FormatsPseudocode Pseudocode for a PERFORM paragraph-name PERFORM Paragraph . . PARAGRAPH . . {Statements to be performed go here . Modularizing Programs Using PERFORM Statements Version 1: Nonmodular Approach IF AMT1-IN AMT2-IN ADD AMT1-IN TO TOTAL-1 ADD AMT2-IN TO TOTAL-2 ADD 1 TO OK-REC-CTR ELSE ADD AMT2-IN TO TOTAL-3 ADD 1 TO ERR-REC-CTR END-IF. Modularizing Programs Using PERFORM Statements Version 2: Modular ApproachIF AMT1-IN AMT2-IN PERFORM 300-OK-RTN ELSE PERFORM 400-ERR-RTN END-IF. 300-OK-RTN. ADD AMT1-IN TO TOTAL-1 ADD AMT2-IN TO TOTAL-2 ADD 1 TO OK-REC-CTR. 400-ERR-RTN. ADD AMT2-IN TO TOTAL-3 ADD 1 TO ERR-REC-CTR. Executing a Group of Paragraphs with a Simple PERFORM PERFORM paragraph-name-1 {THROUGH} {THRU} paragraph-name-2 The PERFORM paragraph-name executes all statements beginning at paragraph-name-1 until the end of paragraph-name-2 is reached. Control is then transferred to the statement directly following the PERFORM. The Use and Misuse of GO TO Statements Format: GO TO paragraph-name-1 Unlike the PERFORM, which returns control to the statement f
您可能关注的文档
- American Attitudes Towards Death and Dying.ppt
- Amtrak Emissions Reduction Initiatives.ppt
- An Introduction to Boosting.ppt
- Analogue to Digital Conversion.ppt
- APNIC Open Policy Meeting 19-21 August 2001.ppt
- Archiving UpdateJune 9, 2003.ppt
- Assessing and Teaching Language.ppt
- Assessment of Protein Status.ppt
- Automated CBC Parametersand Quality Control.ppt
- AVL Trees.ppt
- Chapter 9Partnership Formation and Operation.ppt
- Chapter 9Routine Letters and Goodwill Messages.ppt
- Chapter 9Strategy Review, Evaluation, & Control.ppt
- Chapter 9Wakefulness and Sleep.ppt
- Chapter Nine.ppt
- Chapter Objectives.ppt
- Chapters 9,10 Auditory and Vestibular Systems.ppt
- Characterization of two Field-Plated GaN HEMT Structures.ppt
- Cholesterol, blood pressure, and heart disease.ppt
- Cineplex项目.ppt
最近下载
- 金顺电子材料产业园环境影响报告表.docx VIP
- 化工原理练习与答案.doc
- (正式版)D-L∕T 801-2010 大型发电机内冷却水质及系统技术要求.docx VIP
- 《心理危机与日常调适:写给少年们的10封信》随笔.docx VIP
- 〖GB50157-2013〗地铁设计规范.docx VIP
- 2025年中考英语听力技巧与策略教学+课件.pptx VIP
- 辽2015J601 楼梯标准图集.docx
- 景观桥亮化施工方案.docx
- -求数列通项公式的方法总结ppt(11种方法举例)-.docx VIP
- 第7课+全球联系的初步建立与世界格局的演变 高一下学期统编版必修中外历史纲要下.pptx VIP
文档评论(0)