Learn programming using Pascal / PDF
Learn programming using Pascal / PDF
Table of Contents
Chapter One
Language Basics
Our First Application.
Other examples
Variables
Sub types
Conditional Branching
The If condition.
Air-Conditioner program:.
Weight program
Case .. of statement.
Restaurant program.
Restaurant program using If condition.
Students' Grades program..
Keyboard program.
Loops
For loop.......
Multiplication Table using for loop.
Factorial program.
Repeat Until loop...................................................................................................................
Restaurant program using Repeat loop.........................................................................
While loop........................................................................................................................................
Factorial program using while loop....................................................................
Strings..................................................................................................
Copy function........................................................................................................
Insert procedure........................................................................................
Delete procedure.............................................................................................................
Trim function.......................................................................................................................
StringReplace function.............................................................................................
Arrays.........................................................................................
Records............................................................................................
Files......................................................................................................................
Text files............................................................................................................................
Reading text file program...............................................................................................
Creating and writing into text file.....................................................................................
Appending to a text file.................................................................................
Add to text file program..................................................................................
Random access files................................................................................................................
Typed files...................................................................................................................
Marks program...............................................................................................................
Reading student marks............................................................................
Appending student marks program................................................................
Create and append student marks program...........................................................
Cars database program.....................................................................................
File copying.........................................................................................................
Copy files using file of byte.......................................................................................
Untyped files..................................................................................................................
Copy files using untyped files program..................................................................
Display file contents program..........................................................................................
Date and Time.......................................................................................................................
Date/time comparison.............................................................................................
News recorder program.........................................................................
Constants....................
Fuel Consumption program....................................................................
Ordinal types..............................................................................................................................
Sets........................................................................................................
Exception handling....................................................................................................................
Try except statement...................................................................................
Try finally...........................................................................................................
Raise an exception
Chapter Two
Structured Programming
Introduction.........................................................................................................
Procedures..............................................................................................................
Parameters....................................................................................................................
Restaurant program using procedures.........................................................................................
Functions....................................................................................................................................6
Restaurant program using functions................................................................................................
Local Variables..............................................................................................................................
News database application........................................................................................................
Functions as input parameters........................................................................................
Procedure and function output parameters..............................................................
Calling by reference......................................................................................................
Units...........................................................................................................................................
Units in Lazarus and Free Pascal......................................................................................
Units written by the programmer.......................................................................................
Hejri Calendar....................................................................................................................
Procedure and function Overloading.................................................................................
Default value parameters......................................................................................................................103
Sorting..........................................................................................................................
Bubble sort algorithm............................................................................................................................104
Sorting students' marks..........................................................................................................................106
Selection Sort algorithm........................................................................................................................107
Shell sort algorithm...........................................................................................................................
String sorting................................................................................................................................
Sorting students name program..............................................................................................................111
Sort algorithms comparison...................................................................................................................112
Chapter Three
The Graphical User Interface
Introduction............................................................................................................................
Our First GUI application................................................................................................
Second GUI application......................................................................................................
ListBox application...........................................................................................................
Text Editor Application......................................................................................................................
News Application......................................................................................................................
Application with a Second form..................................................................................................
Chapter Four
Object Oriented
Programming
Introduction................................................................................................................................
First example: Date and Time...........................................................................
News application in Object Oriented Pascal.............................................................
Queue Application..............................................................................................
Object Oriented File..................................................................................................
Copy files using TFileStream................................................................................
Inheritance............................................................................................................................
Learn programming using Pascal / PDF
0 commentaires: