home *** CD-ROM | disk | FTP | other *** search
- 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.
-