LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Function or procedure? (https://www.linuxquestions.org/questions/programming-9/function-or-procedure-109609/)

linuxanswer 10-28-2003 03:02 PM

Function or procedure?
 
What are the mains differences between these and what's the better indipendently their usage

Mara 10-28-2003 03:13 PM

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.