PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Include files  (Read 547 times)

Douglas McDonald

  • Senior Member
  • ***
  • Posts: 236
  • PB, FF3,VB6 , B4A, Proton PDS, Mikroe Basic
    • RedforkSoftware,LLC
Include files
« on: July 07, 2010, 07:54:46 PM »

This is a question not a bug or FF3 problem.

Is there any difference in using #Include "xxxxx" and adding the .inc as a module? Is it compiled the same way?. I know that in some compilers for MCU's if you include a .inc only the functions actually called and the DEF's are compiled.. If I add something like a module the whole thing is compiled even if parts are not used.

Sorry if its a dumb question and now in the days of multi megabyte programs it doesn't really matter but how does FF3 / PB handle it?

Thank you
Doug
Logged
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9497
  • Windows 10
    • PlanetSquires Software
Re: Include files
« Reply #1 on: July 07, 2010, 09:50:59 PM »

In FF3 if you include the code as a module then FF3 will try to parse it and show its functions in the Explorer. FF3 will also move certain things from a module to the CODEGEN*_DECLARES.INC file such as TYPEs, MACROS, GLOBALS, etc.... Files in a project via #INCLUDE's have nothing done to them. They are simply compiled into the project.

FF3 does not do anything special related to determining if a function is called or not in a project. It includes all code in the final EXE unless, of course, if it is specifically excluded via conditional compiling (%IF %DEF, etc...).

I guess that in theory compiles would be a fraction faster if the code is #INCLUDE'd rather than put in a MODULE but I bet it is not noticeable unless the MODULE is very, very big.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer