home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programming Unleashed
/
Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso
/
chap15
/
simpint
/
simpint.dpr
next >
Wrap
Text File
|
1995-03-20
|
555b
|
25 lines
program SimpInt;
{ Program copyright (c) 1995 by Charles Calvert }
{ Project Name: SIMPINT}
{ A simple example program showing how to allocate and
dispose memory for a pointer to an integer }
uses
WinCrt;
type
PInteger = ^Integer;
var
MyInteger: PInteger;
begin
New(MyInteger); { Allocate 2 bytes for the Integer }
MyInteger^ := 25; { Assign a value to the Integer }
WriteLn(MyInteger^); { Write the value to the screen }
Dispose(MyInteger); { Deallocate the memory }
end.