home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Learn Pascal in a Three Days (2nd Ed.)
(Publisher: Wordware Publishing, Inc.)
Author(s):
ISBN: 1556225679
Publication Date: 07/01/97

Bookmark It

Search this book:
 
Preface
Acknowledgment

Chapter 1—HELLO Pascal
1-1 Your First Pascal Program
Comments
Program Heading
Syntax and Conventions
1-2 Displaying Text: WRITELN, WRITE
Drill 1-1
1-3 Crunching Numbers
Integers and Real Numbers
Drill 1-2
Evaluation of Arithmetic Expressions
Drill 1-3
1-4 Using Variables
Variable Declaration
The Assignment Statement
Drill 1-4
1-5 Named Constants
1-6 Type Conversion: ROUND, TRUNC
1-7 Reading from the Keyboard: READLN, READ
1-8 Formatting Output
Drill 1-5
Summary

Chapter 2—Language Elements
2-1 Standard Data Types and Functions
2-2 Numeric Data Types
Numeric Types in Turbo Pascal
2-3 Standard Arithmetic Functions
Example: The Power Function
Example: Grocery Store
Drill 2-1
Turbo Pascal Additional Functions
Drill 2-2
2-4 The Character Type: Char
Standard Functions for Characters
Strings in Standard Pascal
2-5 The STRING Type
Declaration of a STRING
The LENGTH of a STRING
2-6 The BOOLEAN Type
Simple BOOLEAN Expressions
Compound BOOLEAN Expressions
Turbo Pascal Operators
Drill 2-3
Precedence of Operators
Summary

Chapter 3—Decisions
3-1 Making Decisions
3-2 The Simple Decision: IF-THEN
Example: Pascal Credit Card
Using Blocks
Drill 3-1
3-3 The IF-ELSE-THEN Construct
Drill 3-2
3-4 The ELSE-IF Ladders
Example: A Character Tester
3-5 Nested Conditions
Example: Scores and Grades
Tips on the IF-ELSE Puzzles
Drill 3-3
3-6 The Multiple Choice: CASE
Example: A Vending Machine
Example: Number of Days in a Month
Drill 3-4
3-7 Unconditional Branching: GOTO
Repetition Loops
3-8 Turbo Pascal Features: EXIT, CASE-ELSE
Summary

Chapter 4—Loops
4-1 Looping
4-2 The FOR Loop
Example: Powers of Two
Drill 4-1
Example: The Average
4-3 Stepping Up and Stepping Down
Example: The Factorial
Drill 4-2
4-4 Nested Loops
Drill 4-3
4-5 The WHILE Loop
Drill 4-4
4-6 The REPEAT Loop
Drill 4-5
Summary

Chapter 5—Data Architecture
5-1 Ordinal Data Types
Enumerations
Subranges
Drill 5-1
5-2 The TYPE Section
Renaming TYPES
Naming User-Defined Types
Drill 5-2
5-3 Arrays As Data Structures
5-4 One-Dimensional Arrays
Example: Scores of One Student
Displaying Tabulated Results
Drill 5-3
Declaration of Arrays in the TYPE Section
Example: Sorting an Array
Drill 5-4
5-5 Two-Dimensional Arrays
Example: Scores of Students
Array Initialization
Drill 5-5
Summary

Chapter 6—Text Processing
6-1 Introduction
6-2 Tips on OUTPUT Statements
6-3 Tips on INPUT Statements
Using READLN for Numeric INPUT
Drill 6-1
Using READ for Numeric Input
Drill 6-2
Using READ for Character Input
Using READLN for Character Input
Input of Mixed Types
Example: Scrambling Letters
6-4 Reading a Line of Text: EOLN
Example: Character Counter
Drill 6-3
6-5 Reading a File of Text: EOF
Example: Frequency Counter
6-6 String Manipulation
Tips on String Input/Output
Example: Sorting Names
Drill 6-4
6-7 String Functions and Procedures
CONCAT
COPY
POS
DELETE
INSERT
Drill 6-5
Summary

Chapter 7—Program Architecture
7-1 Programs and Subprograms
7-2 Procedures
Procedure Definition
Passing Values to Procedures
Drill 7-1
Passing Back Values from Procedures
7-3 Global and Local Variables
Example: Sorting Procedure
7-4 Functions
Drill 7-2
7-5 Tips on the Scope of Variables
7-6 Recursion
Drill 7-3
Summary

Chapter 8—Sets and Records
8-1 Sets
8-2 Set Declaration and Assignment
Rules and Restrictions
8-3 Set Operators and Operations
Union
Intersection
Difference
Drill 8-1
Relational Operators
Drill 8-2
Example: Text Analyzer
8-4 Records
Record Declaration
Accessing Fields
The WITH Statement
8-5 Nesting Records
Drill 8-3
Summary

Chapter 9—Files and Applications
9-1 Data Files
9-2 Text Files
9-3 Reading a Text File
The File Variable
File Parameters
Opening a File for Input: RESET
Closing the File
File Input Procedures: READ, READLN
The EOF and EOLN Functions
Application 1: Disk-File Text Analyzer
9-4 Displaying a Text File
Reading a Text File as a Set of Strings
Reading Multiple Strings
9-5 Creating a Text File: REWRITE
The Output Procedures: WRITE, WRITELN
Drill 9-1
Application 2: Employee File
Drill 9-2
Application 3: Payroll
Drill 9-3
9-6 Non-Text Files
Application 4: Payroll System
Drill 9-4
Appending a File
Summary

Chapter 10—Using Variant Records
10-1 Variant Records
10-2 Example: Enhanced Payroll System
Drill 10-1
10-3 Deleting Records from the File
Drill 10-2
10-4 Updating Records
Drill 10-3
10-5 Enhance the Program Modularity
Suggestions
Summary

Chapter 11—Pointers and Linked Lists
11-1 Dynamic Memory Allocation
11-2 Pointers
Pointer Operations
Pointers to Records
Drill 11-1
Passing Pointers as Parameters
Drill 11-2
11-3 Linked Lists
List Declaration
Building a List
Reading a List
Example: A Linked List Demo
Storing Lists in Files
Reading Lists from Files
Drill 11-3
Example: A List of Records
Searching the List
Drill 11-4
Deleting Nodes from Lists
Summary
The Next Step
Appendix A
Appendix B
Appendix C
Index

Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.