Learn Pascal in Three Days

Learn Pascal in Three Days

by Sam Abolrous
Learn Pascal in Three Days

Learn Pascal in Three Days

by Sam Abolrous

Paperback(3E)

$64.95 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Learn Pascal in Three Days, Third Edition provides the novice programmer with the fundamentals of the language and is ideal for those wanting a solid foundation in structured programming. This update of one of the best-selling introductions to Pascal is designed for beginning programmers with its chapter summaries, review questions, hands-on examples, and easy-to-follow drills. Readers start with simple programs and end up with useful real-world applications. Among the topics covered are building and evaluating arithmetic expressions, using structures and loops, creating arrays, manipulating text data, writing procedures and functions to make programs more modular, and declaring and using pointers.

With this book, learn about the design of structured Pascal programs; problem-solving algorithms; simple and structured data types; variables, operators, and expressions; iteration, branching, and selection statements; pointers and linked lists; manipulating data files; real-life applications and solved drills.

Product Details

ISBN-13: 9781556228056
Publisher: Jones & Bartlett Learning
Publication date: 09/25/2001
Edition description: 3E
Pages: 324
Product dimensions: 0.70(w) x 9.25(h) x 7.50(d)

About the Author

Programming Writer, Microsoft Corporation

Table of Contents

Prefacev
Acknowledgmentsvi
About the Authorvii
Chapter 1Hello Pascal1
1-1Your First Pascal Program1
Comments1
Program Heading2
Syntax and Conventions2
1-2Displaying Text: Writeln, Write3
1-3Crunching Numbers4
Integers and Real Numbers5
Evaluation of Arithmetic Expressions7
1-4Using Variables9
Variable Declaration9
The Assignment Statement10
1-5Named Constants12
1-6Type Conversion: Round, Trunc13
1-7Reading from the Keyboard: Readln, Read14
1-8Formatting Output15
Summary17
Exercises18
Answers18
Chapter 2Language Elements19
2-1Standard Data Types and Functions19
2-2Numeric Data Types19
Numeric Types in Turbo Pascal20
2-3Standard Arithmetic Functions21
Example: The Power Function23
Example: Grocery Store23
Turbo Pascal Additional Functions25
2-4The Character Type: CHAR26
Standard Functions for Characters27
Strings in Standard Pascal29
2-5The String Type30
Declaration of a String30
The Length of a String31
2-6The Boolean Type32
Simple Boolean Expressions32
Compound Boolean Expressions34
Turbo Pascal Operators35
Precedence of Operators35
Summary36
Exercises38
Answers38
Chapter 3Decisions39
3-1Making Decisions39
3-2The Simple Decision: If-then40
Example: Pascal Credit Card40
Using Blocks42
3-3The If-then-else Construct43
3-4The Else-if Ladders45
Example: A Character Tester46
3-5Nested Conditions47
Example: Scores and Grades47
Tips on the If-Else Puzzles50
3-6The Multiple Choice: Case51
Example: A Vending Machine51
Example: Number of Days in a Month52
3-7Unconditional Branching: GOTO54
Repetition Loops55
3-8Turbo Pascal Features: Exit, Case-Else56
Summary57
Exercises59
Answers60
Chapter 4Loops61
4-1Looping61
4-2The For Loop62
Example: Powers of Two64
Example: The Average65
4-3Stepping Up and Stepping Down66
Example: The Factorial67
4-4Nested Loops68
4-5The While Loop69
4-6The Repeat Loop72
Summary74
Exercises75
Answers76
Chapter 5Data Architecture77
5-1Ordinal Data Types77
Enumerations77
Subranges79
5-2The TYPE Section81
Renaming Types81
Naming User-Defined Types82
5-3Arrays as Data Structures83
5-4One-Dimensional Arrays85
Example: Scores of One Student85
Displaying Tabulated Results87
Declaration of Arrays in the TYPE Section90
Example: Sorting an Array90
5-5Two-Dimensional Arrays93
Example: Scores of Students94
Array Initialization96
Summary97
Exercises98
Answers99
Chapter 6Text Processing101
6-1Manipulating Text Data101
6-2Tips on OUTPUT Statements101
6-3Tips on INPUT Statements102
Using READLN for Numeric Input102
Using READ for Numeric Input104
Using READ for Character Input105
Using READLN for Character Input107
Input of Mixed Types108
Example: Scrambling Letters109
6-4Reading a Line of Text: EOLN111
Example: Character Counter111
6-5Reading a File of Text: EOF112
Example: Frequency Counter112
6-6String Manipulation113
Tips on String Input/Output113
Example: Sorting Names114
6-7String Functions and Procedures116
LENGTH116
CONCAT117
COPY117
POS117
DELETE117
INSERT118
Summary119
Exercises119
Answers120
Chapter 7Program Architecture121
7-1Programs and Subprograms121
7-2Procedures121
Procedure Definition122
Passing Values to Procedures123
Passing Back Values from Procedures126
7-3Global and Local Variables127
Example: Sorting Procedure127
7-4Functions130
7-5Tips on the Scope of Variables131
7-6Recursion133
Summary134
Exercises134
Answers135
Chapter 8Sets and Records137
8-1Sets137
8-2Set Declaration and Assignment138
Rules and Restrictions139
8-3Set Operators and Operations140
Union140
Intersection140
Difference140
Tips on Using Set Operators140
Relational Operators141
Example: Text Analyzer142
8-4Records144
Record Declaration144
Accessing Fields145
The WITH Statement146
8-5Nesting Records149
Summary151
Exercises152
Answers153
Chapter 9Files and Applications155
9-1Data Files155
9-2TEXT Files156
9-3Reading a TEXT File156
File Variables156
File Parameters157
Opening a File for Input: RESET157
Closing the File158
File Input Procedures: READ, READLN158
The EOF and EOLN Functions159
Example: Disk-File Text Analyzer159
9-4Displaying a TEXT File162
Reading a TEXT File as a Set of Strings163
Reading Multiple Strings164
9-5Creating a TEXT File: REWRITE165
File Output Procedures: WRITE, WRITELN165
Example: Employee File166
Example: Payroll168
9-6Non-TEXT Files172
Example: Payroll System173
Appending a File176
9-7Using the File Buffer Variable178
Summary179
Exercises180
Answers181
Chapter 10Using Variant Records183
10-1Variant Records183
10-2Example: Enhanced Payroll System185
10-3Deleting Records from the File192
10-4Updating Records201
10-5Enhance the Program Modularity204
Suggestions214
Summary214
Exercises215
Answers215
Chapter 11Pointers and Linked Lists217
11-1Dynamic Memory Allocation217
11-2Pointers217
Pointer Operations220
Pointers to Records222
Passing Pointers as Parameters224
11-3Basics of Linked Lists225
List Declaration225
Building a List225
Reading a List227
Example: A Linked List Demo229
Storing Lists in Files232
Reading Lists from Files233
Example: A List of Records234
11-4Searching Lists235
11-5Deleting Nodes from Lists243
Summary253
Exercises254
Answers255
The Next Step256
Appendix AThe ASCII Character Set257
Appendix BReserved Words and Standard Identifiers261
Appendix CAnswers to Drills265
Index317
From the B&N Reads Blog

Customer Reviews