09.10.2014 Views

download pascal tutorial (pdf - Tutorials Point

download pascal tutorial (pdf - Tutorials Point

download pascal tutorial (pdf - Tutorials Point

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Accessing Two-Dimensional Array Elements: ......................................... 85<br />

Declaring Dynamic Arrays ....................................................................... 86<br />

Declaring Packed Arrays ......................................................................... 88<br />

<strong>Point</strong>ers .................................................................................. 90<br />

What Are <strong>Point</strong>ers? .................................................................................. 90<br />

Printing a Memory Address in Pascal ...................................................... 91<br />

NILL <strong>Point</strong>ers ........................................................................................... 92<br />

Pascal <strong>Point</strong>ers in Detail: ......................................................................... 93<br />

Incrementing a <strong>Point</strong>er ............................................................................. 94<br />

Decrementing a <strong>Point</strong>er ........................................................................... 94<br />

<strong>Point</strong>er Comparisons ............................................................................... 95<br />

Records ................................................................................ 101<br />

Defining a Record .................................................................................. 101<br />

Accessing Fields of a Record ................................................................ 102<br />

Records as Subprogram Arguments ...................................................... 103<br />

<strong>Point</strong>ers to Records ............................................................................... 104<br />

The With Statement ............................................................................... 106<br />

Variants ................................................................................ 108<br />

Declaring a Variant ................................................................................ 108<br />

Example: ................................................................................................ 109<br />

Sets ...................................................................................... 110<br />

Defining Set Types and Variables .......................................................... 110<br />

Set Operators ........................................................................................ 111<br />

Example: ................................................................................................ 112<br />

File Handling ........................................................................ 114<br />

Creating and Writing to a File ................................................................ 115<br />

Reading from a File ............................................................................... 115<br />

Files as Subprogram Parameter ............................................................ 116<br />

Text Files ............................................................................................... 117<br />

Appending to a File ................................................................................ 118<br />

File Handling Functions ......................................................................... 118<br />

Memory Management .......................................................... 124<br />

Allocating Memory Dynamically ............................................................. 124<br />

Resizing and Releasing Memory ........................................................... 126<br />

Memory Management Functions ........................................................... 127<br />

Units ..................................................................................... 131<br />

Using Built-in Units ................................................................................ 131<br />

Creating and Using a Pascal Unit .......................................................... 132<br />

Date Time ............................................................................ 135<br />

iii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!