Page 1 of 1

Recommended Basic Program Structure

Posted: Thu Jun 13, 2024 5:22 pm
by msteffes
Hello All,
I recently purchased PB and am looking forward to learning to use it well.
Where can I find an example of a recommended standard program structure layout/Template for PureBasic.
.

Re: Recommended Basic Program Structure

Posted: Thu Jun 13, 2024 6:11 pm
by STARGĂ…TE
It somehow depends on the type of program you want to write: application, game, library, ...

In general you start with declaration of constants, structures, and variables.
Then you wrote all you procedures you would need and finally you call your main procedure or you add an event loop.
If you code becomes larger you outsource parts and include it with IncludeFile.