Chapter 1 INTRODUCTION. SYS-ED/ Computer Education Techniques, Inc.

Similar documents
Introduction PL/1 Programming

1 Chapter Plan...1 Exercise - Simple Program...2

INTRODUCTION 1 AND REVIEW

Chapter 2 CREATING DATA FIELDS. SYS-ED/ Computer Education Techniques, Inc.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

A Fast Review of C Essentials Part I

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

UNIT- 3 Introduction to C++

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Chapter 2: Basic Elements of C++

Chapter 2 REXX STATEMENTS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Objectives. In this chapter, you will:

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc.

Computer Programming C++ (wg) CCOs

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

BLM2031 Structured Programming. Zeyneb KURT

C++ Programming: From Problem Analysis to Program Design, Third Edition

X Language Definition

The C++ Language. Arizona State University 1

Pace University. Fundamental Concepts of CS121 1

1. Lexical Analysis Phase

DEPARTMENT OF MATHS, MJ COLLEGE

Chapter 2: Introduction to C++

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Full file at

Programming Language 2 (PL2)

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)

String Computation Program

JME Language Reference Manual

Chapter 3. Fortran Statements

Review of the C Programming Language for Principles of Operating Systems

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages

Our Strategy for Learning Fortran 90

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

Computers Programming Course 5. Iulian Năstac

Functions. Functions are everywhere in C. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

1 Lexical Considerations

Language Fundamentals

RTL Reference 1. JVM. 2. Lexical Conventions

Review of the C Programming Language

Arithmetic Operations

LESSON 5 FUNDAMENTAL DATA TYPES. char short int long unsigned char unsigned short unsigned unsigned long

CS201 - Introduction to Programming Glossary By

ANSI C Programming Simple Programs

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

C-LANGUAGE CURRICULAM

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

Lexical Considerations

Preface Introduction... 23

Full file at C How to Program, 6/e Multiple Choice Test Bank

LEXICAL 2 CONVENTIONS

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions.

Short Notes of CS201

Number Systems, Scalar Types, and Input and Output

CSCI 171 Chapter Outlines

Appendix G C/C++ Notes. C/C++ Coding Style Guidelines Ray Mitchell 475

Creating a C++ Program

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS

UEE1302 (1102) F10: Introduction to Computers and Programming

Programming in C++ 6. Floating point data types

Chapter 1 INTRODUCTION. SYS-ED/ Computer Education Techniques, Inc.

Watcom FORTRAN 77. Language Reference. Edition 11.0c

Basic Elements of C. Staff Incharge: S.Sasirekha

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University

LOON. Language Reference Manual THE LANGUAGE OF OBJECT NOTATION. Kyle Hughes, Jack Ricci, Chelci Houston-Borroughs, Niles Christensen, Habin Lee

PART I. Part II Answer to all the questions 1. What is meant by a token? Name the token available in C++.

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

LECTURE 02 INTRODUCTION TO C++

Decaf Language Reference Manual

Absolute C++ Walter Savitch

Information Science 1

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

Fundamental of Programming (C)

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

BASIC ELEMENTS OF A COMPUTER PROGRAM

DECLARATIONS. Character Set, Keywords, Identifiers, Constants, Variables. Designed by Parul Khurana, LIECA.

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols.

Lecture 2 Tao Wang 1

c Microsoft, 1977, 1978, 1979

Special Topics for Embedded Programming

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

9. Elementary Algebraic and Transcendental Scalar Functions

CMAT Language - Language Reference Manual COMS 4115

BC An Arbitrary Precision Desk-Calculator Language. Lorinda Cherry Robert Morris Bell Laboratories Murray Hill, New Jersey ABSTRACT

CHAPTER 3 BASIC INSTRUCTION OF C++

Language Reference Manual simplicity

Introduction to Programming Using Java (98-388)

Python. Objects. Geog 271 Geographic Data Analysis Fall 2010

Operators in C. Staff Incharge: S.Sasirekha

Chapter 12 Variables and Operators

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Transcription:

Chapter 1 INTRODUCTION SYS-ED/ Computer Education Techniques, Inc.

Objectives You will learn: Facilities and features of PL/1. Structure of programs written in PL/1. Data types. Storage classes, control, and dynamic storage allocation. Language features. Types and use of statements. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page i

1 What is PL/1? PL/1 stands for Programming Language 1. It is a free-form and highly-structured language with a wide variety of features that support scientific, engineering, commercial, and system programming tasks. It has been designed to provide: Machine independence. Structured programming constructs. Exception handling capabilities. Dynamic storage management. Extensive data types. Data aggregates - arrays, structures, unions, and combinations thereof. Extensive I/O capabilities. Built-in functions: string, mathematical, arithmetic, precision, array, storage control, condition handling, date/time. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 1

2 PL/1: Strengths and Advantages 2.1 Free-form Unlike many other languages, PL/1 has no reserved keywords. PL/1 determines the meaning of keywords from the context of use. The programmer can concentrate on program logic and not be concerned about the use of words which may have a specific meaning in the language. Defaults help in avoiding inadvertent keyword coding errors. 2.2 Machine Independence PL/1 defines its data types without regard for any hardware. An integer is defined as having a mode of REAL or COMPLEX, base of BINARY or DECIMAL, along with the required precision. Examples: FIXED BINARY(14) declares a binary integer of 14 data bits. FIXED DECIMAL(4) declares a decimal integer of 4 decimal digits. The implementers deliver even if the machine has no support for such data type or precision. 2.3 Macro Facility The macro facility permits conditional compilation and modification of PL/1 source before the compilation. A programmer can include specific code during development and testing, and exclude it from a production program. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 2

PL/1 is a block-oriented language consisting of: 3 Program Structure packages procedures begin blocks statements PL/1's block structure provides the capability for producing highly-modular applications. This results from blocks having the capability to contain declarations which define variable names and storage class. Programmers can restrict the scope of a variable to a single block or a group of blocks, or allow space to be known throughout the compilation unit or a load module. 3.1 Structured Programming Constructs PL/1 provides constructs that allow for program logic to be highly modular and structured for reliability in development, maintenance, and extensibility. Commonly used constructs include: Construct PACKAGEs, PROCEDUREs, and BEGIN blocks SELECT... WHEN... OTHERWISE logic DO statement Description Permit a high degree of data and program logic encapsulation. Provide for sophisticated case logic. Provide for grouping of a number of statements as a single unit that can be executed unconditionally one time, forever, or while a condition is true or until a condition becomes true. Combinations of these constructs, along with loop controlling statements LEAVE and ITERATE, provide for complex looping logic. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 3

4 Data Types PL/1 has a variety of data types that can be represented and manipulated. Data types include: Real or complex, floating-point or fixed-point, signed or unsigned binary or decimal, and numeric and editable picture data with programmer selected precision. Varying or non-varying, character or bit or graphic, run-time adjustable or compile-time fixed length strings. Program control data supporting pointer and offset locators, adjustable or fixed size areas for grouping of dynamic allocations, entry data, on pointers and file, label, and format data. Areas may be written out to the disk and read back at a later date permitting preservation of linked-lists. 4.1 Data Arrays, Structures, and Unions In PL/1, data items can be single data elements or they can be grouped together to form data aggregates that can be referred to either collectively or individually. Data aggregates can be: Arrays arrays of structures or unions structures structures or unions of arrays unions combinations of the above. The data aggregates provide a foundation for the description and manipulation of conceivable data. 4.2 Data Manipulation Data may be manipulated as individual items or as an aggregate. Example: One invocation of the SQRT built-in function can take the square root of an entire 15-dimensional array, producing an identical array containing square root values in the corresponding elements. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 4

5 Built-in Functions PL/1 provides approximately 200 built-in functions, pseudovariables, and subroutines that manipulate scalar and aggregate data. Examples: Purpose of Function Character, Bit, and Graphic string manipulation Arithmetic computation Mathematical computation Floating point inquiries Floating point manipulation Integer manipulation Precision handling Array manipulation Storage control Condition handling Input/Output Date/Time manipulation Examples INDEX, CENTER MAX, RANDOM ATANH, GAMMA HUGE, TINY SUCC, SCALE IAND, RAISE2 BINARY, UNSIGNED HBOUND, SUM EMPTY, ADDR ONCHAR, ONLOC COUNT, FILEOPEN DATETIME, DATE CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 5

6 Storage Classes, Control, and Dynamic Storage Allocation There are four different storage classes: AUTOMATIC STATIC CONTROLLED BASED Application objects' data type, representation, nature of use, etc. normally dictates the type of storage class used for each. Programmers can dynamically allocate and free based and controlled storage. For all storage classes, data may be automatically initialized when it is allocated. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 6

7 Condition Handling PL/1 provides facilities to handle a variety of conditions that can arise during PL/1 program execution. These conditions may be expected or unexpected and may be detected by the hardware (e.g. ZERODIVIDE) or detected by PL/1 (e.g. CONVERSION) or the operating system or other software. These facilities can be used for writing applications in PL/1 that can provide non-stop operations and also handle user initiated attention interrupts and normal and abnormal program termination. 7.1 Program Checkout Conditions can be enabled in a variety of ways to have a program automatically diagnosed for: Array subscripts being out of range. String and substrings being out of range. Data exceeding declared or machine supported precisions. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 7

8 Input and Output PL/1 programs have the capability to: process various sizes and type of records. access various devices. edit and validate various kinds of input and output data. produce report files. Two types of I/O are provided: Input/Output Record-oriented Input/Output Description Deals with aggregates of data and logically transmits one record at a time without performing any data conversions. Such files may be indexed, relative, or consecutive. Stream Input/Output Deals with a logically continuous stream of characters and logically transmits a data item while performing conversions between the internal form and the external form. The data items may be transmitted as a list, edited list, an annotated list, or a combination of these. PL/1 automatically handles file opening and closing operations. However, a PL/1 program also has the capability to precisely manage I/O operations including: file opening file closing status exceptional conditions CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 8

8.1 I/O Conditions I/O condition handling features include: Condition End of file reached. End of a report page reached. Record not found. Record truncated. I/O errors. File cannot be found. Whether a file is open. Key for which record was not found. Source that caused conversion error. The Character within source that caused conversion error. File associated with the I/O condition. Page number of current report page. Line number of current line within the current report page. Marked By ENDFILE ENDPAGE KEY RECORD TRANSMIT UNDEFINEDFILE FILEOPEN ONKEY ONSOURCE ONCHAR ONFILE PAGENO LINENO CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 9

9 Language Features 9.1 Blocks PL/1 is a block-structured language. External Procedure, is the outermost block, provides the shell for all code and data. Procedures are executed only as subroutines or functions. Begin-blocks, are executed inline, can be nested to any depth. Data declared within a block has a scope consisting of the block within which it is declared and all nested blocks, unless overridden by another declaration. This serves to provide a flexible and convenient referencing scheme. PL/1 does not have reserved words. 9.2 Keywords PL/1 has keywords which are recognized only in context, and may otherwise be used freely by the programmer. A variable and keyword can use the identical designation. PL/1 does allow the use of a variable named FIXED; the compiler differentiates the keyword FIXED from the variable FIXED through the usage. 9.3 Data PL/1 offers the programmer control over data attributes. A variable can be specified to the number of digits or bits it is to occupy; whenever possible the compiler will provide this. The compiler can also check assignments to this variable to insure that the declared size is not exceeded. Strings can have constant lengths or vary from zero to a maximum number of bits or bytes, with the compiler keeping track of the current length. PL/1 provides a wide variety of data types, including the standard arithmetic types FIXED, FLOAT, REAL or COMPLEX. It offers true strings, CHARACTER or BIT, with enforcement of declared maximum lengths. As a point of comparison, the C programming language does not provide verify assignments to strings. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 10

Other data types are POINTER and OFFSET, and GRAPHIC. PICTURE data, provides automatic editing and de-editing on assignments according to a predefined mask. More esoteric data types are LABEL and ENTRY variables, AREA, EVENT, FILE, and so on. PL/1 provides an extensive system of defaults. 9.4 Defaults In the minimal case, data does not need to be declared at all. A set of default attributes will be provided depending on the context in which it is used. The programmer has to declare only the required minimal information, the compiler will provide the rest. Declaring a variable FIXED with no other attributes will cause the compiler to add the default attributes DECIMAL and a precision (number of digits). CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 11

9.5 Storage PL/1 provides a number of storage attributes. The default is AUTOMATIC, which is allocated on entry to a block, and freed at exit. Storage Attribute STATIC BASED EXTERNAL Description Must be explicitly allocated by the program, analogous to a pushdown stack in which freeing the current generation pops up any previous allocation. Provides a mapping for storage otherwise allocated or referenced, or may also be explicitly allocated and freed. Resembles STATIC, but may be referenced by other separatelycompiled programs. 9.6 I/O Input-output is an integral part of PL/1; it is not an add-on library function. Files can be processed as streams of bytes or as individual records which can be fixed-length or variable. Files can be processed sequentially or randomly by record or key. Programs can start an I/O operation and later be interrupted on completion. 9.7 Exceptions PL/1 has a detailed system for handling exceptions, which can asynchronously result from I/O errors, hardware-generated or program-generated. Handlers for each condition can be specified via the ON statement; handlers can be stacked and unstacked. Many error conditions can be enabled or disabled by the program on the level of a block or a single statement. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 12

10 Character Set Character Set SBCS: Single-byte character set Description A character set is an ordered set of unique representations referred to as characters. Character set 0640 is known as the invariant character set because a character has the same code point in all code pages. A code point is a one-byte code representing one of 256 potential characters. DBCS: Double-byte character set A code page is an assignment of graphic characters and control function definitions to all of the code points. Each character in the DBCS - double-byte character set is stored in 2 bytes. When the GRAPHIC compiler option is in effect, certain source language elements can be written using DBCS and SBCS characters. On the z/os platform, each string of DBCS characters must be immediately enclosed in shift codes; however shift codes are neither required or accepted on the other platforms supported by the compiler. 10.1 Character Types Character Type Alphabetic and extralingual characters Description The default alphabet for PL/1 is the English alphabet, plus the extralingual characters. The default extralingual characters are the number sign (#), the at sign (@), and the currency sign ($). Decimal digits PL/1 recognizes the ten decimal digits, 0 through 9. They are known as digits and used to write decimal constants and other representations and values. Binary digits PL/1 recognizes the two binary digits, 0 and 1. Hexadecimal digits They are also known as bits and are used to write binary and bit constants. PL/1 recognizes the 16 hexadecimal digits, 0 through 9 and A through F. A through F represent the decimal values 10 through 15, respectively. They are known as hex digits and used to write constants in hexadecimal notation. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 13

10.2 Special Characters The special characters used in PL/1 are: Character Meaning b Blank. = Equal sign or assignment symbol. + Plus sign. Minus sign. * Asterisk or multiply symbol. / Slash or divide symbol. ( Left parenthesis. ) Right parenthesis., Comma.. Point or period. ' Single quotation mark. " Double quotation mark. % Percent. ; Semicolon. : Colon. Not symbol, exclusive-or symbol. & And symbol. Or symbol. > Greater than symbol. < Less than symbol. _ Break character (underscore). CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 14

10.3 Composite Symbols Special characters can be combined to create composite symbols. Composite Symbol Meaning Concatenation. ** Exponentiation. < Not less than. > Not greater than. = Not equal to; Evaluate, exclusive-or and assign. <= Less than or equal to. >= Greater than or equal to. /* Start of a comment. */ End of a comment. > Locator - pointers and offsets. => Locator - handles. += Evaluate expression, add and assign. = Evaluate expression, subtract and assign. *= Evaluate expression, multiply and assign. = Evaluate expression, divide and assign. = Evaluate expression, or and assign. &= Evaluate expression, and, and assign. \= Evaluate expression, concatenate and assign. **= Evaluate expression, exponentiate and assign. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 15

11 Statement Elements 11.1 Identifiers An identifier is a series of characters that are not contained in a comment or a constant. The first character of an identifier must be an alphabetic or extralingual character. If the identifier names an INTERNAL symbol, it may also use the break (_) character as its first character. Other characters, if any, can be alphabetic, extralingual, digit, or the break (_) character. External user names must not start with IBM, PLI, CEE, _IBM, _PLI, and _CEE. Identifiers can be PL/1 keywords or programmer-defined names. 11.2 Programmer-defined Names In a PL/1 program, names are given to variables and program-control data. There are also built-in names, condition names, and generic names. A name can have only one meaning in a program block; the same name cannot be used for both a file and a floating-point variable in the same block. In order to improve readability, the break character (_) can be used in a name, such as Gross_Pay. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 16

11.3 Blanks Each operator or delimiter can be surrounded with blanks (b). One or more blanks must separate identifiers and constants that are not separated by some other delimiter. Any number of blanks can appear wherever one blank is allowed. 11.4 Comments Comments are allowed wherever blanks are allowed as delimiters. A comment is treated as a blank and used as a delimiter. Comments are ignored and do not affect the logic of a program. Example: /* Specifies the beginning of a comment. Specifies the end of the comment */ CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 17

12 Statements Identifiers, delimiters, operators, and constants are used to construct PL/1 statements. Although a source program consists of a series of records or lines, PL/1 views the program as a continuous stream of characters. There are few restrictions in the format of PL/1 statements, and programs can be written without considering special coding rules or ascertaining whether each statement begins in a specific column. A statement can begin in the next position after the previous statement, or it can be separated by any number of blanks. In order to improve program readability and maintainability and avoid unexpected results caused by loss of trailing blanks in source lines: Do not split a language element across lines. o If a string constant must be written on multiple lines, use the concatenation operator ( ). Do not write more than one statement on a line. Do not split %directives across lines. 12.1 Simple Statements There are three types of simple statements: keyword, assignment, and null. Statement Keyword Assignment Null Explanation Begins with a keyword. Contains one or more identifiers on the left side of the assignment symbol (=) and an expression on the right. It does not begin with a keyword. Consists of only a semicolon and is a non operational statement. Example: /* Simple Program */ HELLO: PROC OPTIONS(MAIN); PUT LIST('HELLO WORLD'); END; CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 18

12.2 Compound Statements Compound statements are all keyword statements. Each begins with a keyword which indicates the purpose of the statement. A compound statement contains one or more simple or compound statements. There are four compound statements: IF ON WHEN OTHERWISE A compound statement is terminated by the semicolon that also terminates the final statement of the compound statement. 12.3 Groups Statements can be contained within larger program units called groups. A group is either a do-group or a select-group. do-group select-group Sequence of statements delimited by a DO statement and a corresponding END statement. Sequence of WHEN statements and an optional OTHERWISE statement delimited by a SELECT statement and a corresponding END statement. The delimiting statements are considered to be part of the group. When a group is used in a compound statement, control either flows into the group or bypasses it; effectively treating the group as if it were a single statement. CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 19

12.4 Program Structure STRUCT: PROCEDURE OPTIONS (MAIN); /* The declarations of variables in a procedure are usually, but not necessarily, placed at the beginning of the procedure. */ DECLARE (X,Y,Z) FIXED, MESSAGE CHARACTER(80), TOTAL FLOAT; /* Executable statements are placed following variable declarations */ X = 0; PUT SKIP LIST(MESSAGE); FINISH: PROCEDURE; DECLARE TEXT (5) CHARACTER (20); END FINISH: /* All procedures must terminate with END statements */ END STRUCT; CETi / COMPUTER EDUCATION TECHNIQUES, INC. (PL/1 Prg - 9.12) Ch 1: Page 20