[fpc-pascal] using units in units...

Ron Weidner xecronix at yahoo.com
Tue Dec 7 22:26:02 CET 2004


I'm looking for a little syntax help please.  How do
you use units in a unit?  The following doesn't work.

unit unit_test;
uses crt;
interface
    function make_line(): String;

implementation
    function make_line(): String;
    begin
         make_line := 'This is a string returned';
    end;
end.

What I'm trying to accomplish in my program is I want
to create a file called defs.pas.  this would contain
all the constants for all the units that make up the
prgram.  For example, there might be a constant
SCREEN_WIDTH or SCREEN_HEIGHT.  Now I want to be 
able to use those varibles in the units, Collide.pas
and Draw.pas.  How is this done in Pascal.

Ron_W





		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 




More information about the fpc-pascal mailing list