Re: Add new col event?



It's a directive to the compiler that you will be declaring all the variables
you use.

If you don't declare your variables and don't have that directive turned on, you
could spend hours trying to find out why:

Ctr1 = ctrl + 1

doesn't work the way you thought it should.

(one of those is ctr-one and one is ctr-ELL).

With "Option explicit", the compiler will notice that one of those variables
isn't defined and yell at you right away.

It may seem like more work to start, but it saves time in the long run.

keyser_Soze@xxxxxxx wrote:
>
> What does the
>
> Option Explicit
>
> do?

--

Dave Peterson
.



Relevant Pages

  • Re: VB 2008: Option Strict On + Infer On at class level
    ... What does the compiler prevent from declaring x As String? ... That's true unless Option Infer is On ... Public Sub New ...
    (microsoft.public.dotnet.languages.vb)
  • Re: VB 2008: Option Strict On + Infer On at class level
    ... What does the compiler prevent from declaring x As String? ... Public Sub New ...
    (microsoft.public.dotnet.languages.vb)
  • Re: On VLAs and incomplete types
    ... I don't understand how a variable is handled by the compiler in ... declaring a VLA. ... an array must be declared with an ... int x; ...
    (comp.lang.c)
  • abstract classes not detected by compiler
    ... I'm using interfaces in C++ by declaring classes with only pure virtual ... needs to inherit from the class. ... - I have a implementing class A that inherits from an interface class. ... The compiler do not generate any errors, but I will of course get a runtime ...
    (comp.lang.cpp)
  • Re: Copy constructors
    ... constructor of the form ... Declaring these functions prevents the compiler from supplying default ... Declaring them private turns most attempted usage into ...
    (microsoft.public.vc.language)