Sub Procedure vs Function

P

Paul

Can anyone give the definative answer as to the
differance between a Sub Procedure and a Function

My answer is that a sub procedure accepts input values
whereas a function accepts input values and exports
values.
 
R

Rick Brandt

Paul said:
Can anyone give the definative answer as to the
differance between a Sub Procedure and a Function

My answer is that a sub procedure accepts input values
whereas a function accepts input values and exports
values.

Well either *can* accept input arguments, but that is required in neither.
The main difference is that a function returns a value.

Some people always use functions and in those cases where a return value is
not actually generated by the process have it return True/False merely to
indicate that the process ran successfully or not.
 
B

Bruce M. Thompson

Can anyone give the definative answer as to the
differance between a Sub Procedure and a Function

My answer is that a sub procedure accepts input values
whereas a function accepts input values and exports
values.

Both Subs and functions can be passed arguments (input values) and can
manipulate those values, but the difference between the two is that a function
can return a value. Your answer was, essentially, correct.

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top