
-----------------------------------
commandos
Mon Feb 18, 2008 10:34 pm

difference between procedure and function?
-----------------------------------
Hey,

I took computer science a couple of years ago in high school and now im trying to remember some of the things we learned. just wondering what the difference is between a function and procedure and when to either. thanks in advance

-----------------------------------
Nick
Mon Feb 18, 2008 10:38 pm

RE:difference between procedure and function?
-----------------------------------
procedure: carry out a set of common commands
function: return a value

-----------------------------------
Saad
Mon Feb 18, 2008 10:42 pm

RE:difference between procedure and function?
-----------------------------------
One thing I want to point out, a procedure is a function, except it doesn't return anything useful, Ie void which is nothing.

-----------------------------------
LaZ3R
Tue Feb 19, 2008 12:27 am

RE:difference between procedure and function?
-----------------------------------
Bla Saad beat me to what I was just about to say :p

Procedures are void functions. The simply execute code when requested without returning any values.

-----------------------------------
commandos
Tue Feb 19, 2008 1:31 am

RE:difference between procedure and function?
-----------------------------------
thanks all

-----------------------------------
riveryu
Tue Feb 19, 2008 10:46 pm

Re: difference between procedure and function?
-----------------------------------
View the 

Functions vs. Procedures 
Fight! part of http://compsci.ca/v3/viewtopic.php?t=14665 tutorial on Proc and Fcn 

I thought it was a legimate argument and may be helpful.
