I would say that this is not what is in your main function, but what is not. Depending on the complexity of your project, you may want to break it down into functional sections, such as “Database Functions,” “Display Functions,” “High Tea with Vicar,” etc.
All about code readability. Can someone else who has never seen your program before stumbling upon it and first get a good generalized idea of what it does?
Then is it easy to see where to go to delve into the mechanism?
Is each function section that runs only a logical process block used? He should not do only one thing, but he should not do everything except the kitchen sink.
Separate your code so that it is supported by an external source.
Because heaven knows when it comes to him, if someone can fix a mistake, everything is better =)
As a direct answer to your question, I would put function calls to each of the main components in the main, setup, process and completion, so that everyone who looks at it will quickly see how the program works. Then they can turn further if they need to.
Wobin
source share