Prime: defining functions in a program
|
12-23-2013, 01:26 AM
(This post was last modified: 01-26-2014 09:46 PM by patrice.)
Post: #1
|
|||
|
|||
Prime: defining functions in a program
Exemple source code
Code:
Respect function parameters in declaration Func3 and Func4 are declared because they are used before being defined. Func1 and Func2 don't need declaration. Func1 and Func4 are visible from outside of the program. At least 1 function must be EXPORTed Respect the EXPORT keyword if a function need declaration. When you declare a function, make an exact copy of the function definition followed by semi. If your functions don't call each other, a simple ordering can avoid declarations. EXPORTed function are visible from everywhere in the calc, including other programs. This open the interesting possibility that you can gather all your common/usual/utility functions in a single utility file and avoid duplicating in every program that use them. Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)