Recommended Basic Program Structure

Just starting out? Need help? Post your questions and find answers here.
msteffes
New User
New User
Posts: 6
Joined: Thu Oct 27, 2022 4:35 pm

Recommended Basic Program Structure

Post 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.
.
User avatar
STARGÅTE
Addict
Addict
Posts: 2226
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Recommended Basic Program Structure

Post 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.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Post Reply