Function or procedure?
What are the mains differences between these and what's the better indipendently their usage
|
When I think about functions and procedures, Pascal comes to my mind. In C, there are only functions.
It's simple (in Pascal): procedure is a function that doesn't return anything. That's the only difference. When you write something and you need to return a result, you use a function. If you don't return anything - it's procedure. No benefits. |
All times are GMT -5. The time now is 01:26 AM. |