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.

Name = Zara Ali<br />

Description: Zara ali a DPS student. She is in class 10 th<br />

When the above code is compiled and executed, it produces the following result:<br />

Name = Zara Ali<br />

Description: Zara ali a DPS student. She is in class 10th<br />

Memory Management Functions<br />

Pascal provides a hoard of memory management functions that is used in implementing<br />

various data structures and implementing low-level programming in Pascal. Many of these<br />

functions are implementation dependent. Free Pascal provides the following functions and<br />

procedures for memory management:<br />

S.N.<br />

Function Name & Description<br />

1 function Addr(X: TAnytype):<strong>Point</strong>er;<br />

Returns address of variable<br />

2 function Assigned(P: <strong>Point</strong>er):Boolean;<br />

Checks if a pointer is valid<br />

3 function CompareByte(const buf1; const buf2; len: SizeInt):SizeInt;<br />

Compares 2 memory buffers byte per byte<br />

4 function CompareChar(const buf1; const buf2; len: SizeInt):SizeInt;<br />

Compares 2 memory buffers byte per byte<br />

5 function CompareDWord(const buf1; const buf2; len: SizeInt):SizeInt;<br />

Compares 2 memory buffers byte per byte<br />

6 function CompareWord(const buf1; const buf2; len: SizeInt):SizeInt;<br />

Compares 2 memory buffers byte per byte<br />

7 function Cseg: Word;<br />

Returns code segment<br />

8 procedure Dispose(P: <strong>Point</strong>er);<br />

Frees dynamically allocated memory<br />

9 procedure Dispose(P: Typed<strong>Point</strong>er; Des: TProcedure);<br />

TUTORIALS POINT<br />

Simply Easy Learning Page 127

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

Saved successfully!

Ooh no, something went wrong!