- Page 1: Pascal Tutorial
- Page 5 and 6: Declaring Constants ...............
- Page 7 and 8: Accessing Two-Dimensional Array Ele
- Page 9 and 10: CHAPTER 1 Pascal Overview This chap
- Page 11 and 12: CHAPTER 2 Environment This section
- Page 13 and 14: Name and version of text editor can
- Page 15 and 16: Pascal Hello World Example Followin
- Page 17 and 18: CHAPTER 4 Basic Syntax You have see
- Page 19 and 20: The Pascal character set consists o
- Page 21 and 22: Type Declarations: The type declara
- Page 23 and 24: Subrange Types Subrange types allow
- Page 25 and 26: Pascal programming language also al
- Page 27 and 28: Enumerated Variables You have seen
- Page 29 and 30: CHAPTER 7 Constants This section sh
- Page 31 and 32: CHAPTER 8 Operators This section sh
- Page 33 and 34: Checks if the value of left operand
- Page 35 and 36: When the above code is compiled and
- Page 37 and 38: program beBitwise; var a, b, c: int
- Page 39 and 40: CHAPTER 9 Decision Making This sect
- Page 41 and 42: Example: Let us try a complete exam
- Page 43 and 44: Example: Let us try a complete exam
- Page 45 and 46: Nested if-then Statements It is alw
- Page 47 and 48: The following rules apply to a case
- Page 49 and 50: Flow Diagram: Example: The followin
- Page 51 and 52: CHAPTER 10 Loops This section shows
- Page 53 and 54:
Flow Diagram: Here, key point of th
- Page 55 and 56:
Flow Diagram Example: program forLo
- Page 57 and 58:
Example: program repeatUntilLoop; v
- Page 59 and 60:
When the above code is compiled and
- Page 61 and 62:
Example: program exBreak; var a: in
- Page 63 and 64:
Example: program exContinue; var a:
- Page 65 and 66:
Example: The following program illu
- Page 67 and 68:
Defining a Function: In Pascal, a f
- Page 69 and 70:
When the above code is compiled and
- Page 71 and 72:
variable named m. The variable m is
- Page 73 and 74:
program exRecursion; var num, f: in
- Page 75 and 76:
procedure swap(x, y: integer); var
- Page 77 and 78:
When the above code is compiled and
- Page 79 and 80:
Now, let us extend the program litt
- Page 81 and 82:
Let us change the previous example
- Page 83 and 84:
When the above code is compiled and
- Page 85 and 86:
12 function AnsiStrLower( Str: PCha
- Page 87 and 88:
CHAPTER 15 Boolean This section sho
- Page 89 and 90:
CHAPTER 16 Arrays This section show
- Page 91 and 92:
Initializing Arrays In Pascal, arra
- Page 93 and 94:
Two-Dimensional Arrays: The simples
- Page 95 and 96:
The following example declares and
- Page 97 and 98:
Passing Arrays as Subprogram Argume
- Page 99 and 100:
Following are some valid pointer de
- Page 101 and 102:
To check for a nil pointer, you can
- Page 103 and 104:
program exPointers; const MAX = 3;
- Page 105 and 106:
program exPointers; const MAX = 3;
- Page 107 and 108:
Value of num = 3000 Value available
- Page 109 and 110:
CHAPTER 18 Records This section sho
- Page 111 and 112:
(* book 2 specification *) Book2.ti
- Page 113 and 114:
type record-ptr = ^ record-name; re
- Page 115 and 116:
(* book 1 specification *) Book1.ti
- Page 117 and 118:
Example: The following example woul
- Page 119:
Set Operators You can perform the f
- Page 122 and 123:
CHAPTER 21 File Handling This secti
- Page 124 and 125:
When the above code is compiled and
- Page 126 and 127:
When the above code is compiled and
- Page 128 and 129:
Reads data from a file into memory
- Page 130 and 131:
Reads from file into variable and g
- Page 132 and 133:
CHAPTER 22 Memory Management This s
- Page 134 and 135:
Resizing and Releasing Memory When
- Page 136 and 137:
Frees dynamically allocated memory
- Page 138 and 139:
Returns segment 37 procedure SetMem
- Page 140 and 141:
eadkey; clrscr; gotoxy(20,3); write
- Page 142 and 143:
When the above code is compiled and
- Page 144 and 145:
Program DateDemo; uses sysutils; va
- Page 146 and 147:
14 function EncodeDate( Year: Word;
- Page 148 and 149:
39 function TimeStampToDateTime( co
- Page 150 and 151:
Objects This section shows the conc
- Page 152 and 153:
type Rectangle = object private len
- Page 154 and 155:
When the above code is compiled and
- Page 156 and 157:
egin r1.init(3, 7); writeln('Draw a
- Page 158 and 159:
function TableTop.getmaterial(): st
- Page 160 and 161:
Classes This section shows the clas
- Page 162 and 163:
{$mode objfpc} // directive to be u
- Page 164 and 165:
Constructors and Destructors for Pa
- Page 166 and 167:
program inheritanceExample; {$MODE
- Page 168 and 169:
When the above code is compiled and