dynamic "uses" 
Author Message
 dynamic "uses"

hello,

does someone know who I can implement dynamic "uses",  without DLL's.

I have a .pas-file with plenty of functions in it. Now I want to split
it up, in lets say 10 sub .pas-files, which I call from the head .pas-
file.
The main reason to do that is that I want to be my programs less big
when compiled. But when I use "uses" and the name of the .pas-files I
still have all .pas-files included. So I don't win any space.

So I wonder if someone knows how I can use the "uses" method dynamic?
So that the sub .pas-file is only included/'compiled with' when a
function is called in the main program.

Thanks,

Timothy Verhamme

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 dynamic "uses"

Quote:

>hello,

>does someone know who I can implement dynamic "uses",  without DLL's.

Not even with DLL's in BP.

Quote:
>I have a .pas-file with plenty of functions in it. Now I want to split
>it up, in lets say 10 sub .pas-files, which I call from the head .pas-
>file.
>The main reason to do that is that I want to be my programs less big
>when compiled. But when I use "uses" and the name of the .pas-files I
>still have all .pas-files included. So I don't win any space.

If your app consists out several modules, some of which aren't needed most
of the time (like configuration programs, etc), and that don't run at the
same time, you could look into overlays.

Quote:
>So I wonder if someone knows how I can use the "uses" method dynamic?
>So that the sub .pas-file is only included/'compiled with' when a
>function is called in the main program.

You can use OVL's, I heard of somebody managing to load some DLL's in BP,
and that is about it I think.


Wed, 18 Jun 1902 08:00:00 GMT  
 dynamic "uses"

Quote:
> I have a .pas-file with plenty of functions in it. Now I want to split
> it up, in lets say 10 sub .pas-files, which I call from the head .pas-
> file.
> The main reason to do that is that I want to be my programs less big
> when compiled. But when I use "uses" and the name of the .pas-files I
> still have all .pas-files included. So I don't win any space.

They aren't included, they are recompiled if the .TPU files are missing.
(TPC or BPC /M or F9). You can recompile everything with (TPC or BPC/B or
Alt-F9) but it is useless normally.

Quote:
> So I wonder if someone knows how I can use the "uses" method dynamic?
> So that the sub .pas-file is only included/'compiled with' when a
> function is called in the main program.

If you are using Turbo/Borland Pascal, there is a smart linker that
strips every unused function or data, period! This is in the .EXE, at
the end. But it seems that, in your case, the compiler recompiles things
it shouldn't need to recompile. Maybe wrong pathes in your config ?
Or maybe you believe it recompiles all, although it doesn't...

______________________________________________________
Gautier  --  http://members.nbci.com/gdemont/gsoft.htm



Wed, 18 Jun 1902 08:00:00 GMT  
 dynamic "uses"
I use Borland Delphi 4.0



Quote:
> > I have a .pas-file with plenty of functions in it. Now I want to
split
> > it up, in lets say 10 sub .pas-files, which I call from the head
.pas-
> > file.
> > The main reason to do that is that I want to be my programs less big
> > when compiled. But when I use "uses" and the name of the .pas-files
I
> > still have all .pas-files included. So I don't win any space.

> They aren't included, they are recompiled if the .TPU files are
missing.
> (TPC or BPC /M or F9). You can recompile everything with (TPC or
BPC/B or
> Alt-F9) but it is useless normally.

> > So I wonder if someone knows how I can use the "uses" method
dynamic?
> > So that the sub .pas-file is only included/'compiled with' when a
> > function is called in the main program.

> If you are using Turbo/Borland Pascal, there is a smart linker that
> strips every unused function or data, period! This is in the .EXE, at
> the end. But it seems that, in your case, the compiler recompiles
things
> it shouldn't need to recompile. Maybe wrong pathes in your config ?
> Or maybe you believe it recompiles all, although it doesn't...

> ______________________________________________________
> Gautier  --  http://members.nbci.com/gdemont/gsoft.htm

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 dynamic "uses"

Quote:

> I use Borland Delphi 4.0

Then you should post in one of the Delphi groups...

<snip>

Robert
--
Robert AH Prins

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 dynamic "uses"

Quote:
>I use Borland Delphi 4.0

The Delphi linker eliminates all unused procedures etc.

Have a look at the map, which units and procedures really exist in your linked
program.

DoDi



Sun, 27 Apr 2003 12:16:38 GMT  
 dynamic "uses"

Quote:


> >hello,

> >does someone know who I can implement dynamic "uses",  without DLL's.

> Not even with DLL's in BP.

> >I have a .pas-file with plenty of functions in it. Now I want to split
> >it up, in lets say 10 sub .pas-files, which I call from the head .pas-
> >file.
> >The main reason to do that is that I want to be my programs less big
> >when compiled. But when I use "uses" and the name of the .pas-files I
> >still have all .pas-files included. So I don't win any space.

> If your app consists out several modules, some of which aren't needed most
> of the time (like configuration programs, etc), and that don't run at the
> same time, you could look into overlays.

> >So I wonder if someone knows how I can use the "uses" method dynamic?
> >So that the sub .pas-file is only included/'compiled with' when a
> >function is called in the main program.

> You can use OVL's, I heard of somebody managing to load some DLL's in BP,
> and that is about it I think.

You can have dynamic DLLs in BP7. So you could for example write your
own set of graphics drivers or so. There are two ways to call routines
inside a DLL: static and dynamic. With static, the name of the DLL is
fix, with dynamic, you can exchange the dlls and your program has just
to look, which is now the correct (for e.g. via an ini-file).

Markus



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. dynamic "uses" -- no dll

2. The keys "-"/"+"/"*"

3. ""256 Color Mouse""

4. TP7:no mousecursor using "SVGA256.BGI"

5. TP7: no mouse using "SVGA256.BGI"

6. Using IBLOCAL as "semi-server"

7. What are "Denormals" and "Nans"

8. Utility to convert "asm" to "inline( )"

9. "delete from" followed by "insert into" = AV

 

 
Powered by phpBB® Forum Software