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

Size: px
Start display at page:

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

Transcription

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

2 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 ) Ch 1: Page i

3 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 ) Ch 1: Page 1

4 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 ) Ch 1: Page 2

5 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 ) Ch 1: Page 3

6 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 ) Ch 1: Page 4

7 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 ) Ch 1: Page 5

8 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 ) Ch 1: Page 6

9 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 ) Ch 1: Page 7

10 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 ) Ch 1: Page 8

11 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 ) Ch 1: Page 9

12 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 ) Ch 1: Page 10

13 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 ) Ch 1: Page 11

14 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 ) Ch 1: Page 12

15 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 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 ) Ch 1: Page 13

16 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 ) Ch 1: Page 14

17 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 ) Ch 1: Page 15

18 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 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 ) Ch 1: Page 16

19 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 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 ) Ch 1: Page 17

20 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 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 ) Ch 1: Page 18

21 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 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 ) Ch 1: Page 19

22 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 ) Ch 1: Page 20

Introduction PL/1 Programming

Introduction PL/1 Programming Chapter 1: Introduction Performance 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.

More information

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

1 Chapter Plan...1 Exercise - Simple Program...2 Chapter 1: Introduction Exercise - Simple Program...2 2 Subject Matter...4 1. What is PL/1?...4 2. PL/1: Strengths and Advantages...5 3. Program Structure...6 4. Data Types...7 5. Built-in Functions...8

More information

INTRODUCTION 1 AND REVIEW

INTRODUCTION 1 AND REVIEW INTRODUTION 1 AND REVIEW hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Programming: Advanced Objectives You will learn: Program structure. Program statements. Datatypes. Pointers. Arrays. Structures.

More information

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

Chapter 2 CREATING DATA FIELDS. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 CREATING DATA FIELDS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Declaring PL/1 variables with scale, base, and mode. The internal representation of numeric, character,

More information

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

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e 1992-2010 by Pearson Education, Inc. An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss in depth the formatting features

More information

A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

More information

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

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

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

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION EDIABAS Electronic Diagnostic Basic System BEST/2 LANGUAGE DESCRIPTION VERSION 6b Copyright BMW AG, created by Softing AG BEST2SPC.DOC CONTENTS CONTENTS...2 1. INTRODUCTION TO BEST/2...5 2. TEXT CONVENTIONS...6

More information

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

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

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

Chapter 2 REXX STATEMENTS. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 REXX STATEMENTS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Variables. REXX expressions. Concatenation. Conditional programming and flow of control. Condition traps.

More information

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

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers

More information

Objectives. In this chapter, you will:

Objectives. In this chapter, you will: Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates arithmetic expressions Learn about

More information

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

Chapter 2 SYSTEM OVERVIEW. SYS-ED/ Computer Education Techniques, Inc. Chapter 2 SYSTEM OVERVIEW SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Structure of a program. Easytrieve Plus job processing logic. Easytrieve Plus syntax rules. How to use listing

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

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

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

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

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming. Zeyneb KURT BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

More information

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

C++ Programming: From Problem Analysis to Program Design, Third Edition C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 2: Basic Elements of C++ Objectives (continued) Become familiar with the use of increment and decrement operators Examine

More information

X Language Definition

X Language Definition X Language Definition David May: November 1, 2016 The X Language X is a simple sequential programming language. It is easy to compile and an X compiler written in X is available to simplify porting between

More information

The C++ Language. Arizona State University 1

The C++ Language. Arizona State University 1 The C++ Language CSE100 Principles of Programming with C++ (based off Chapter 2 slides by Pearson) Ryan Dougherty Arizona State University http://www.public.asu.edu/~redoughe/ Arizona State University

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

1. Lexical Analysis Phase

1. Lexical Analysis Phase 1. Lexical Analysis Phase The purpose of the lexical analyzer is to read the source program, one character at time, and to translate it into a sequence of primitive units called tokens. Keywords, identifiers,

More information

DEPARTMENT OF MATHS, MJ COLLEGE

DEPARTMENT OF MATHS, MJ COLLEGE T. Y. B.Sc. Mathematics MTH- 356 (A) : Programming in C Unit 1 : Basic Concepts Syllabus : Introduction, Character set, C token, Keywords, Constants, Variables, Data types, Symbolic constants, Over flow,

More information

Chapter 2: Introduction to C++

Chapter 2: Introduction to C++ Chapter 2: Introduction to C++ Copyright 2010 Pearson Education, Inc. Copyright Publishing as 2010 Pearson Pearson Addison-Wesley Education, Inc. Publishing as Pearson Addison-Wesley 2.1 Parts of a C++

More information

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

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309 A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48

More information

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

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Copyright 2009 Publishing Pearson as Pearson Education, Addison-Wesley Inc. Publishing as Pearson Addison-Wesley

More information

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

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

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

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Programming Language 2 (PL2)

Programming Language 2 (PL2) Programming Language 2 (PL2) 337.1.1 - Explain rules for constructing various variable types of language 337.1.2 Identify the use of arithmetical and logical operators 337.1.3 Explain the rules of language

More information

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

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated 'A'

More information

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

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition

More information

String Computation Program

String Computation Program String Computation Program Reference Manual Scott Pender scp2135@columbia.edu COMS4115 Fall 2012 10/31/2012 1 Lexical Conventions There are four kinds of tokens: identifiers, keywords, expression operators,

More information

JME Language Reference Manual

JME Language Reference Manual JME Language Reference Manual 1 Introduction JME (pronounced jay+me) is a lightweight language that allows programmers to easily perform statistic computations on tabular data as part of data analysis.

More information

Chapter 3. Fortran Statements

Chapter 3. Fortran Statements Chapter 3 Fortran Statements This chapter describes each of the Fortran statements supported by the PGI Fortran compilers Each description includes a brief summary of the statement, a syntax description,

More information

Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

More information

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

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages EnableBasic Old Content - visit altium.com/documentation Modified by Admin on Sep 13, 2017 Parent page: Scripting Languages This Enable Basic Reference provides an overview of the structure of scripts

More information

Our Strategy for Learning Fortran 90

Our Strategy for Learning Fortran 90 Our Strategy for Learning Fortran 90 We want to consider some computational problems which build in complexity. evaluating an integral solving nonlinear equations vector/matrix operations fitting data

More information

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

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

Computers Programming Course 5. Iulian Năstac

Computers Programming Course 5. Iulian Năstac Computers Programming Course 5 Iulian Năstac Recap from previous course Classification of the programming languages High level (Ada, Pascal, Fortran, etc.) programming languages with strong abstraction

More information

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

Functions. Functions are everywhere in C. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR 1 Functions Functions are everywhere in C Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Introduction Function A self-contained program segment that carries

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Language Fundamentals

Language Fundamentals Language Fundamentals VBA Concepts Sept. 2013 CEE 3804 Faculty Language Fundamentals 1. Statements 2. Data Types 3. Variables and Constants 4. Functions 5. Subroutines Data Types 1. Numeric Integer Long

More information

RTL Reference 1. JVM. 2. Lexical Conventions

RTL Reference 1. JVM. 2. Lexical Conventions RTL Reference 1. JVM Record Transformation Language (RTL) runs on the JVM. Runtime support for operations on data types are all implemented in Java. This constrains the data types to be compatible to Java's

More information

Review of the C Programming Language

Review of the C Programming Language Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

More information

Arithmetic Operations

Arithmetic Operations 232 Chapter 4 Variables and Arithmetic Operations Arithmetic Operations The ability to perform arithmetic operations on numeric data is fundamental to computer programs. Many programs require arithmetic

More information

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

LESSON 5 FUNDAMENTAL DATA TYPES. char short int long unsigned char unsigned short unsigned unsigned long LESSON 5 ARITHMETIC DATA PROCESSING The arithmetic data types are the fundamental data types of the C language. They are called "arithmetic" because operations such as addition and multiplication can be

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

ANSI C Programming Simple Programs

ANSI C Programming Simple Programs ANSI C Programming Simple Programs /* This program computes the distance between two points */ #include #include #include main() { /* Declare and initialize variables */ double

More information

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

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

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

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

More information

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

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee C Language Part 1 (Minor modifications by the instructor) References C for Python Programmers, by Carl Burch, 2011. http://www.toves.org/books/cpy/ The C Programming Language. 2nd ed., Kernighan, Brian,

More information

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

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath UNIT - I Introduction to C Programming Introduction to C C was originally developed in the year 1970s by Dennis Ritchie at Bell Laboratories, Inc. C is a general-purpose programming language. It has been

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

Preface Introduction... 23

Preface Introduction... 23 Preface... 19 1 Introduction... 23 1.1 Releases Used... 23 1.2 New Features in Releases 7.02 and 7.2... 25 1.2.1 New Features in ABAP... 25 1.2.2 New Features in Tools... 28 1.3 Syntax Conventions in The

More information

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

Full file at   C How to Program, 6/e Multiple Choice Test Bank 2.1 Introduction 2.2 A Simple Program: Printing a Line of Text 2.1 Lines beginning with let the computer know that the rest of the line is a comment. (a) /* (b) ** (c) REM (d)

More information

LEXICAL 2 CONVENTIONS

LEXICAL 2 CONVENTIONS LEXIAL 2 ONVENTIONS hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. ++ Programming Lexical onventions Objectives You will learn: Operators. Punctuators. omments. Identifiers. Literals. SYS-ED \OMPUTER EDUATION

More information

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

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions. 1 of 22 8/4/2018, 4:03 PM Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Number Systems, Scalar Types, and Input and Output

Number Systems, Scalar Types, and Input and Output Number Systems, Scalar Types, and Input and Output Outline: Binary, Octal, Hexadecimal, and Decimal Numbers Character Set Comments Declaration Data Types and Constants Integral Data Types Floating-Point

More information

CSCI 171 Chapter Outlines

CSCI 171 Chapter Outlines Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures

More information

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

Appendix G C/C++ Notes. C/C++ Coding Style Guidelines Ray Mitchell 475 C/C++ Notes C/C++ Coding Style Guidelines -0 Ray Mitchell C/C++ Notes 0 0 0 0 NOTE G. C/C++ Coding Style Guidelines. Introduction The C and C++ languages are free form, placing no significance on the column

More information

Creating a C++ Program

Creating a C++ Program Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer. 1 Creating a C++ Program created using an

More information

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

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 2. F The AS/400 family of computers, as with all IBM midrange and mainframe computers, uses the EBCDIC coding system. 3. F Arrival sequence files do not

More information

UEE1302 (1102) F10: Introduction to Computers and Programming

UEE1302 (1102) F10: Introduction to Computers and Programming Computational Intelligence on Automation Lab @ NCTU Learning Objectives UEE1302 (1102) F10: Introduction to Computers and Programming Programming Lecture 00 Programming by Example Introduction to C++ Origins,

More information

Programming in C++ 6. Floating point data types

Programming in C++ 6. Floating point data types Programming in C++ 6. Floating point data types! Introduction! Type double! Type float! Changing types! Type promotion & conversion! Casts! Initialization! Assignment operators! Summary 1 Introduction

More information

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

Chapter 1 INTRODUCTION. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 INTRODUCTION SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Different types of file access available to the programmer. How to define fields in a program. The flow of

More information

Watcom FORTRAN 77. Language Reference. Edition 11.0c

Watcom FORTRAN 77. Language Reference. Edition 11.0c Watcom FORTRAN 77 Language Reference Edition 110c Notice of Copyright Copyright 2000 Sybase, Inc and its subsidiaries All rights reserved No part of this publication may be reproduced, transmitted, or

More information

Basic Elements of C. Staff Incharge: S.Sasirekha

Basic Elements of C. Staff Incharge: S.Sasirekha Basic Elements of C Staff Incharge: S.Sasirekha Basic Elements of C Character Set Identifiers & Keywords Constants Variables Data Types Declaration Expressions & Statements C Character Set Letters Uppercase

More information

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

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University C Programming Notes Dr. Karne Towson University Reference for C http://www.cplusplus.com/reference/ Main Program #include main() printf( Hello ); Comments: /* comment */ //comment 1 Data Types

More information

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

LOON. Language Reference Manual THE LANGUAGE OF OBJECT NOTATION. Kyle Hughes, Jack Ricci, Chelci Houston-Borroughs, Niles Christensen, Habin Lee LOON THE LANGUAGE OF OBJECT NOTATION Language Reference Manual Kyle Hughes, Jack Ricci, Chelci Houston-Borroughs, Niles Christensen, Habin Lee October 2017 1 Contents 1 Introduction 3 2 Types 4 2.1 JSON............................................

More information

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

PART I.   Part II Answer to all the questions 1. What is meant by a token? Name the token available in C++. Unit - III CHAPTER - 9 INTRODUCTION TO C++ Choose the correct answer. PART I 1. Who developed C++? (a) Charles Babbage (b) Bjarne Stroustrup (c) Bill Gates (d) Sundar Pichai 2. What was the original name

More information

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

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

LECTURE 02 INTRODUCTION TO C++

LECTURE 02 INTRODUCTION TO C++ PowerPoint Slides adapted from *Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* Copyright 2012 Pearson Education Inc. COMPUTER PROGRAMMING LECTURE 02 INTRODUCTION

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

Information Science 1

Information Science 1 Information Science 1 Simple Calcula,ons Week 09 College of Information Science and Engineering Ritsumeikan University Topics covered l Terms and concepts from Week 8 l Simple calculations Documenting

More information

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

CPS122 Lecture: From Python to Java last revised January 4, Objectives: Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

Fundamental of Programming (C)

Fundamental of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 3 Constants, Variables, Data Types, And Operations Department of Computer Engineering

More information

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

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

BASIC ELEMENTS OF A COMPUTER PROGRAM

BASIC ELEMENTS OF A COMPUTER PROGRAM BASIC ELEMENTS OF A COMPUTER PROGRAM CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING LOGO Contents 1 Identifier 2 3 Rules for naming and declaring data variables Basic data types 4 Arithmetic operators

More information

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

DECLARATIONS. Character Set, Keywords, Identifiers, Constants, Variables. Designed by Parul Khurana, LIECA. DECLARATIONS Character Set, Keywords, Identifiers, Constants, Variables Character Set C uses the uppercase letters A to Z. C uses the lowercase letters a to z. C uses digits 0 to 9. C uses certain Special

More information

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

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols. EEE-117 COMPUTER PROGRAMMING Basic Elements of C++ Objectives General Questions Become familiar with the basic components of a C++ program functions, special symbols, and identifiers Data types Arithmetic

More information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

c Microsoft, 1977, 1978, 1979

c Microsoft, 1977, 1978, 1979 c Microsoft, 1977, 1978, 1979 Microsoft FORTRAN 80 User's Manual CONTENTS SECTION 1 1.1 1.2 1.3 Compiling FORTRAN Programs 5 FORTRAN-80 Command Scanner..... 5 1.1.1 Format of Commands......... 5 1.1.2

More information

Special Topics for Embedded Programming

Special Topics for Embedded Programming 1 Special Topics for Embedded Programming ETH Zurich Fall 2018 Reference: The C Programming Language by Kernighan & Ritchie 1 2 Overview of Topics Microprocessor architecture Peripherals Registers Memory

More information

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

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2-1 Parts of a C++ Program Parts of a C++ Program // sample C++ program

More information

9. Elementary Algebraic and Transcendental Scalar Functions

9. Elementary Algebraic and Transcendental Scalar Functions Scalar Functions Summary. Introduction 2. Constants 2a. Numeric Constants 2b. Character Constants 2c. Symbol Constants 2d. Nested Constants 3. Scalar Functions 4. Arithmetic Scalar Functions 5. Operators

More information

CMAT Language - Language Reference Manual COMS 4115

CMAT Language - Language Reference Manual COMS 4115 CMAT Language - Language Reference Manual COMS 4115 Language Guru: Michael Berkowitz (meb2235) Project Manager: Frank Cabada (fc2452) System Architect: Marissa Ojeda (mgo2111) Tester: Daniel Rojas (dhr2119)

More information

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

BC An Arbitrary Precision Desk-Calculator Language. Lorinda Cherry Robert Morris Bell Laboratories Murray Hill, New Jersey ABSTRACT BC An Arbitrary Precision Desk-Calculator Language Lorinda Cherry Robert Morris Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT BC is a language and a compiler for doing arbitrary precision arithmetic

More information

CHAPTER 3 BASIC INSTRUCTION OF C++

CHAPTER 3 BASIC INSTRUCTION OF C++ CHAPTER 3 BASIC INSTRUCTION OF C++ MOHD HATTA BIN HJ MOHAMED ALI Computer programming (BFC 20802) Subtopics 2 Parts of a C++ Program Classes and Objects The #include Directive Variables and Literals Identifiers

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Python. Objects. Geog 271 Geographic Data Analysis Fall 2010

Python. Objects. Geog 271 Geographic Data Analysis Fall 2010 Python This handout covers a very small subset of the Python language, nearly sufficient for exercises in this course. The rest of the language and its libraries are covered in many fine books and in free

More information

Operators in C. Staff Incharge: S.Sasirekha

Operators in C. Staff Incharge: S.Sasirekha Operators in C Staff Incharge: S.Sasirekha Operators An operator is a symbol which helps the user to command the computer to do a certain mathematical or logical manipulations. Operators are used in C

More information

Chapter 12 Variables and Operators

Chapter 12 Variables and Operators Basic C Elements Chapter 12 Variables and Operators Original slides from Gregory Byrd, North Carolina State University! Variables named, typed data items! Operators predefined actions performed on data

More information

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

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Java application A computer program that executes when you use the java command to launch the Java Virtual Machine

More information