Contents 3 PREFACE INTRODUCTION 1. 9 11 DATA TYPES 2. The Alphabet 2.1 11 Variable Names 2.2 11 Constants 2.3 12 Variables 2.4 13 Standard Variable Types 14 User Defined Data Types 16 1 Assignment Statements 2.5 17 Arithmetic Expressions 2.6 18 Hierarchy Of Operations 19 Numbers 22 Exercises 2.7 23 STRUCTURE OF A PASCAL PROGRAM 3. 28 Comments In PASCAL programs 3.1 29 Displaying Data 3.2 30 Output Field Width 3.3 34 Displaying Integer Numbers 34 Displaying Real Numbers 37 Input In PASCAL 3.4 42 Character Data 47 Exercises 3.5 50 CONTROL STRUCTURES 55 WHILE Statement 4.1 58 REPEAT Statement 4.2 64 IF Statement 4.3 68 FOR Statement 4.4 74 CASE Statement 4.5 78 GOTO Statement 4.6 83 Reading A String Of Characters 4.7 85 Exercises 4.8 87 FUNCTIONS 92
Contents PREFACE 3 1. INTRODUCTION 9 2. DATA TYPES 11 2.1 The Alphabet 11 2.2 Variable Names 11 2.3 Constants 12 2.4 Variables 13 Standard Variable Types 14 User Defined Data Types 16 2.5 Assignment Statements 17 2.6 Arithmetic Expressions 18 Hierarchy Of Operations 19 Numbers 22 2.7 Exercises 23 3. STRUCTURE OF A PASCAL PROGRAM 28 3.1 Comments In PASCAL programs 29 3.2 Displaying Data 30 3.3 Output Field Width 34 Displaying Integer Numbers 34 Displaying Real Numbers 37 3.4 Input In PASCAL 42 Character Data 47 3.5 Exercises 50 CONTROL STRUCTURES 55 4.1 WHILE Statement 58 4.2 REPEAT Statement 64 4.3 IF Statement 68 4.4 FOR Statement 74 4.5 CASE Statement 78 4.6 GOTO Statement 83 4.7 Reading A String Of Characters 85 4.8 Exercises 87 FUNCTIONS 92 1
4653324597.docx