Author |
Message |
commandos
|
Posted: Mon Feb 18, 2008 10:34 pm Post subject: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: Mon Feb 18, 2008 10:38 pm Post subject: RE:difference between procedure and function? |
|
|
procedure: carry out a set of common commands
function: return a value |
|
|
|
|
![](images/spacer.gif) |
Saad
![](http://compsci.ca/v3/uploads/user_avatars/182387547249e7ebb91fb8a.png)
|
Posted: Mon Feb 18, 2008 10:42 pm Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
LaZ3R
|
Posted: Tue Feb 19, 2008 12:27 am Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
commandos
|
Posted: Tue Feb 19, 2008 1:31 am Post subject: RE:difference between procedure and function? |
|
|
thanks all |
|
|
|
|
![](images/spacer.gif) |
riveryu
![](http://compsci.ca/v3/uploads/user_avatars/196991102647ae2debe0bf0.jpg)
|
Posted: Tue Feb 19, 2008 10:46 pm Post subject: 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. |
|
|
|
|
![](images/spacer.gif) |
|