Author Topic: Where you can buy current versions of PowerBASIC.  (Read 5180 times)

rrr314159

  • Member
  • *****
  • Posts: 1383
Re: Where you can buy current versions of PowerBASIC.
« Reply #15 on: July 26, 2015, 09:39:55 AM »
That's why I put "dead code removal" in quotes and even put (so to speak): it's a different mechanism: an unused macro never gets put in the code in the first place. Still the effect is the same. You can include all your favorite macros (as, in fact, I usually do) and never have to pick out just the ones used. Whereas with procedures unwanted ones must be taken out, unless you don't mind them bloating the .exe (and unless, of course, you're using PB)

Actually that's what lib's or dll's are for, put procs in there and only the used ones will be in the .exe. Again, that's not the same as dead code removal, which works without any extra effort
I am NaN ;)

jcfuller

  • Member
  • **
  • Posts: 177
Re: Where you can buy current versions of PowerBASIC.
« Reply #16 on: July 26, 2015, 07:31:16 PM »
Actually that's what lib's or dll's are for, put procs in there and only the used ones will be in the .exe.

Only if the granularity is one procedure per obj file.
If one procedure of an obj file, with more than one procedure  is referenced, all code of that obj file will be included.

James

rrr314159

  • Member
  • *****
  • Posts: 1383
Re: Where you can buy current versions of PowerBASIC.
« Reply #17 on: July 27, 2015, 02:24:05 AM »
Thanks James for the correction !
I am NaN ;)

Gunther

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: Where you can buy current versions of PowerBASIC.
« Reply #18 on: July 27, 2015, 02:28:00 AM »
James,

Only if the granularity is one procedure per obj file.
If one procedure of an obj file, with more than one procedure  is referenced, all code of that obj file will be included.

good explanation. But such pre-compiled libs have also the disadvantage, that they must in some cases new compiled by updating the operating system or the compiler.

Gunther
Get your facts first, and then you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: Where you can buy current versions of PowerBASIC.
« Reply #19 on: July 27, 2015, 02:36:33 AM »
a library may contain numerous object modules
if part of a module is "pulled in", the entire module is pulled in with it
it's best to break things up, putting seperate procs and seperate data in different modules

in some cases, a specific data item is only used by one proc
in that case, they may be placed together in a single module

José Roca

  • Regular Member
  • *
  • Posts: 2
Re: Where you can buy current versions of PowerBASIC.
« Reply #20 on: July 27, 2015, 05:55:47 AM »
Dead code removal is a great feature, not only for not having to take the pain of compiling each procedure separately, but also for classes. For example, I wrote a class to do GUI programming boh with PBWIN and PBCC that has many methods (one for each Windows control, some for custom controls, an OLE container, etc.). Thanks to the dead code removal, only the code of the methods that are called is included in the .exe.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4930
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Where you can buy current versions of PowerBASIC.
« Reply #21 on: July 27, 2015, 03:33:52 PM »
José is correct here, dead code removal works something like linker resolved dependencies in that as long as the function that is called AND its dependencies are present the compiler will add all of the necessary code but no other junk. In MASM/VC if you write your library modules properly and not bundle them all together you bypass any granularity problems and get only what you call but it does mean you must write the library modules correctly with one procedure per module.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: