Thread View: comp.lang.pascal.borland
2 messages
2 total messages
Started by Saurabh Sinha
Tue, 07 Dec 1999 00:00
Converting from PAS to TPU
Author: Saurabh Sinha
Date: Tue, 07 Dec 1999 00:00
Date: Tue, 07 Dec 1999 00:00
12 lines
1222 bytes
1222 bytes
Hi
I needed some help in coverting a pascal program file into a more general
UNIT, so that I could use the program from another program by just referring
to the name of the external bmp file: Say,: bmp('H:\Test.bmp'); Also, I
would like some advice on changing the position of the bitmap...
Thanks in advance for your mail.
If possible, also forward your reply to sinha@mweb.co.za
Saurabh
Re: Converting from PAS to TPU
Author: Jens Gesing
Date: Tue, 07 Dec 1999 00:00
Date: Tue, 07 Dec 1999 00:00
34 lines
1953 bytes
1953 bytes
Hi!
Units are build like this:
UNIT Name; { Name is your name of the unit }
INTERFACE { here you have to declare the
procedures/functions you would like to use in other programs }
PROCEDURE My1; { Declaration of your procedure My1 }
...
IMPLEMENTATION { here is the part where you put your commands of your
procedures }
PROCEDURE My1; { The commands of procedure My1 }
BEGIN;
WRITELN('This is only a test!');
END;
END.
Now you can use the procedure My1 in every of your programs. Remember that
the unit has to be implemented in your program (using Uses, for example:
Uses Name }
BTW: Do not cross-post.
CU
Jens
--
[ HOMEPAGE: http://home.t-online.de/home/jens.gesing/index.htm ]
[ PROGRAMMING-DO-IT-YOURSELF: http://members.xoom.com/goldman47/index.htm ]
[ EMAIL: jensi_man@gmx.de ]�
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads