Option Explicit vs. Private/Public - Newbie 
Author Message
 Option Explicit vs. Private/Public - Newbie

So what's the difference between using 'Private' to declare and using
'Option Explicit'?

thanks!



Mon, 29 Apr 2002 03:00:00 GMT  
 Option Explicit vs. Private/Public - Newbie

Quote:

>So what's the difference between using 'Private' to declare and using
>'Option Explicit'?

These are two different things.

'Option Explicit' requires the declaration of each used variable.
'Private' defines variables, functions, ... that can't be seen (and
used) from code outside of the class.

HTH,
    Matthias



Mon, 29 Apr 2002 03:00:00 GMT  
 Option Explicit vs. Private/Public - Newbie
I have it.

Option explicit helps with debugging.VB makes sure you've declared every
variable before you use it. This gets used at the very beginning of
declaring variables.

Public (and private) doesn't have a direct effect on the declarations.
These terms are used with subroutines. Two totally different things.

So I guess, unless I made a mistake here, nevermind.

Quote:

> So what's the difference between using 'Private' to declare and using
> 'Option Explicit'?

> thanks!



Mon, 29 Apr 2002 03:00:00 GMT  
 Option Explicit vs. Private/Public - Newbie
Thanks. I just found this info too.

Thanks for your help!!!

Quote:


> >So what's the difference between using 'Private' to declare and using
> >'Option Explicit'?

> These are two different things.

> 'Option Explicit' requires the declaration of each used variable.
> 'Private' defines variables, functions, ... that can't be seen (and
> used) from code outside of the class.

> HTH,
>     Matthias



Mon, 29 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB5: Option Private Module vs Public

2. option explicit or no option explicit?

3. Declaring variables as Static vs Private/Public -- XML

4. Private Resultset vs. Public Resultset

5. Public vs Private

6. Private vs Public functions & subs

7. Friend vs Private class and public

8. Private Resultset vs. Public Resultset

9. Public vs Private variables

10. Public vs Private Declairs

11. private vs public API declares

12. Option Explicit/Option Strict Settings?

 

 
Powered by phpBB® Forum Software