14.08.2012, 23:08
For example, stocks are useful when writing libraries : You are stocking functions for an eventual use, if a stock function is used, it will be compiled, if not, it will be discarded from the compiled code.
Public functions are always compiled, no matter if you make use of them or not, wich is why you get a warning when not using them.
__________
In short words :
- Stocks are intended for keeping a list of functions that you will eventually use in the course of development, they can be sorted in libraries (Ex : File manipulation libraries)
- Public functions are used for (almost) all the rest : The actual functions that represent the structure of your code, Callbacks, etc.
Public functions are always compiled, no matter if you make use of them or not, wich is why you get a warning when not using them.
__________
In short words :
- Stocks are intended for keeping a list of functions that you will eventually use in the course of development, they can be sorted in libraries (Ex : File manipulation libraries)
- Public functions are used for (almost) all the rest : The actual functions that represent the structure of your code, Callbacks, etc.