Including files in the program

Previous topic - Next topic

Lazarus

Gernot, I can't find anything in the docs about including files of code - it's possible, isn't it? :-O

bigsofty

On the IDE, the window to the right of the source code window, click on the "Files" tab...

This will show you a tree view of the files included in your project.

"Main Program" is your actual program
"Sources" is your included GLBasic libraries

To add a file to your project (and compile it as part of your program)... right click on "Sources" and then, via the pop-up menu, "Open File" to add your include file (or "New File" to create one)

A new tab will appear in the source window, allowing you to edit this file. Any functions, types or variables, within this file, are now accessible as part of the main program.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Lazarus


bigsofty

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)