Functions or Procedures? 
Author Message
 Functions or Procedures?

I am making some DLLs that will be used by ASP.

In terms of the public interface, it seems that I will always be creating functions and never creating procedures.

This is because I will, presumably, always want to return some kind of value-- success, failure, recordset, whatever.

This seems to work fine.

However, since I have not done a lot of this, I am not sure if there are any hidden implications by using this strategy.

For example, is there anything that is inherently different between functions and procedures?

I don't know.

Please advise.



Tue, 10 Sep 2002 03:00:00 GMT  
 Functions or Procedures?
Quote:
> is there anything that is inherently different between functions and

procedures?

Yes. Functions return a result, procedures don't. That's it.



Sat, 14 Sep 2002 03:00:00 GMT  
 Functions or Procedures?
Other than the fact thay functions return a result and subs do not, it
becomes a matter of choice.  You can code subs to "return" a result by
having a param passed by reference ("ByRef").  The sub would then have
access to that variable directly.  When the sub returns, check the var.

HTH,

Chris Rybitski

Quote:

> I am making some DLLs that will be used by ASP. In terms of the public
> interface, it seems that I will always be creating functions and never
> creating procedures. This is because I will, presumably, always want
> to return some kind of value-- success, failure, recordset,
> whatever. This seems to work fine. However, since I have not done a
> lot of this, I am not sure if there are any hidden implications by
> using this strategy. For example, is there anything that is inherently
> different between functions and procedures? I don't know. Please
> advise.



Sun, 15 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. execute a variable as a function/sub procedure (like eval function in java(script))

2. Confused about Functions and Procedures

3. How to get function/sub procedure name

4. Getting function and procedure names using VBA

5. caller of function/sub procedure

6. using functions or procedures in Access 2.0 in Visual Basic with the createquerydef property

7. Whats behind VB functions and procedures

8. caller of function/sub procedure

9. functions/stored procedures

10. passing arrays to functions and procedures

11. How can I Call a Sub or Function Procedure with a Variable as Function or Procedure Name. Please Help

12. How To Make A Index Of The Functions (Only Procedure Name !) ?

 

 
Powered by phpBB® Forum Software