PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: ... forms and other modules ...  (Read 606 times)

tom cone jr

  • Guest
... forms and other modules ...
« on: December 29, 2008, 12:17:14 PM »


This phrase appears throughout the help files.  What are "... other modules ..." and why would one want to have them in a project?   Is this term defined somewhere I've missed (perhaps in the PowerBASIC help files?).

Thanks.

-- tom
Logged

TechSupport

  • Guest
Re: ... forms and other modules ...
« Reply #1 on: December 29, 2008, 01:31:08 PM »

Hi Tom,

You can link to other modules from within FireFly. A "module" in this context is nothing more than a BASIC source code file. I name my modules with an .inc file extension.

In FireFly, you add modules two ways:

The first way is to use FireFly itself to either create a new module or load an existing module into FireFly. Using this functionality means that FireFly will parse this file during code generation to take out the sub/function, equates, types, unions, etc... and copy them to the CODEGEN*_DECLARES file in order to handle forward referencing (something that PB has half implemented in PB9).

The second way is to link directly to the source code file. This is the method that many PB'ers are used to with using DDT or their own hand written programs. In this approach you simply #INCLUDE the file. I usually put my #INCLUDE's at the beginning of my main startup Form. Actually, a better place to put your #INCLUDE's is in a simple text file called "user_includes.inc". Check out this post: http://planetsquires.com/support/index.php?topic=2075.0

Logged

tom cone jr

  • Guest
Re: ... forms and other modules ...
« Reply #2 on: December 29, 2008, 02:23:19 PM »

Thanks.

Will check out the related thread.

-- tom
Logged