Where Do I place the option Explicit??
Author |
Message |
Stephen Burd #1 / 11
|
 Where Do I place the option Explicit??
Well in VB6 you could place the option explicit in the form general. but I cant find that anywhere and I am very curious as to where I can put it. I read in the help that is is not option explicit {on/off} but it really doesnt help cause I dont know where to put it. It wont let me use the operands "= , / , * , - " using option strict. Apparently option strict is default but I cant find it in the code anywhere. Not to mention there is about 200 lines of code for a 10 line prog. hehe. If anyone can help plz reply. Thanks, Dustin Burda
|
Fri, 30 May 2003 07:01:38 GMT |
|
 |
msnews.microsoft.co #2 / 11
|
 Where Do I place the option Explicit??
You need not use "Option explicit" in VB.Net , it alway require variable declaration like C/c++ or other.
| Well in VB6 you could place the option explicit in the form general. but I | cant find that anywhere and I am very curious as to where I can put it. I | read in the help that is is not option explicit {on/off} but it really | doesnt help cause I dont know where to put it. | | It wont let me use the operands "= , / , * , - " using option strict. | Apparently option strict is default but I cant find it in the code anywhere. | | Not to mention there is about 200 lines of code for a 10 line prog. hehe. | | If anyone can help plz reply. | Thanks, | Dustin Burda | |
|
Fri, 30 May 2003 09:03:22 GMT |
|
 |
Jonathan Alle #3 / 11
|
 Where Do I place the option Explicit??
WRONG! The default is to require variable declaration and strict casting, but it can be turned off. -- Jonathan Allen
Quote: > You need not use "Option explicit" in VB.Net , > it alway require variable declaration like C/c++ or other.
> | Well in VB6 you could place the option explicit in the form general. but > I > | cant find that anywhere and I am very curious as to where I can put it. I > | read in the help that is is not option explicit {on/off} but it really > | doesnt help cause I dont know where to put it. > | > | It wont let me use the operands "= , / , * , - " using option strict. > | Apparently option strict is default but I cant find it in the code > anywhere. > | > | Not to mention there is about 200 lines of code for a 10 line prog. hehe. > | > | If anyone can help plz reply. > | Thanks, > | Dustin Burda > | > |
|
Fri, 30 May 2003 08:39:47 GMT |
|
 |
Jonathan Alle #4 / 11
|
 Where Do I place the option Explicit??
Try this at the top of the file. Option Strict Off Option Explicit On -- Jonathan Allen
Quote: > Well in VB6 you could place the option explicit in the form general. but I > cant find that anywhere and I am very curious as to where I can put it. I > read in the help that is is not option explicit {on/off} but it really > doesnt help cause I dont know where to put it. > It wont let me use the operands "= , / , * , - " using option strict. > Apparently option strict is default but I cant find it in the code anywhere. > Not to mention there is about 200 lines of code for a 10 line prog. hehe. > If anyone can help plz reply. > Thanks, > Dustin Burda
|
Fri, 30 May 2003 08:38:46 GMT |
|
 |
Miguel Santo #5 / 11
|
 Where Do I place the option Explicit??
ARE YOU SURE?!?!?!?! C'mon, take it easy. Take your car and go hit some grannys if you have to, great way to relax :) Best Regards, Miguel Santos Jonathan Allen escreveu na mensagem ... Quote: >WRONG! >The default is to require variable declaration and strict casting, but it >can be turned off. >-- >Jonathan Allen
>> You need not use "Option explicit" in VB.Net , >> it alway require variable declaration like C/c++ or other.
>> | Well in VB6 you could place the option explicit in the form general. but >> I >> | cant find that anywhere and I am very curious as to where I can put it. >I >> | read in the help that is is not option explicit {on/off} but it really >> | doesnt help cause I dont know where to put it. >> | >> | It wont let me use the operands "= , / , * , - " using option strict. >> | Apparently option strict is default but I cant find it in the code >> anywhere. >> | >> | Not to mention there is about 200 lines of code for a 10 line prog. >hehe. >> | >> | If anyone can help plz reply. >> | Thanks, >> | Dustin Burda >> | >> |
|
Fri, 30 May 2003 20:45:21 GMT |
|
 |
Bill McCarth #6 / 11
|
 Where Do I place the option Explicit??
Hi Stephen To set option explicit on/off for your project, right click on the project in the Solution Explorer and select properties. In the properties dialog, then select the Common Properties build in the left hand pane(treeview). Inthe right hand pane of the dialog, you will see the options are there.
Quote: > Well in VB6 you could place the option explicit in the form general. but I > cant find that anywhere and I am very curious as to where I can put it. I > read in the help that is is not option explicit {on/off} but it really > doesnt help cause I dont know where to put it. > It wont let me use the operands "= , / , * , - " using option strict. > Apparently option strict is default but I cant find it in the code anywhere. > Not to mention there is about 200 lines of code for a 10 line prog. hehe. > If anyone can help plz reply. > Thanks, > Dustin Burda
|
Fri, 30 May 2003 22:00:20 GMT |
|
 |
Alex Moran #7 / 11
|
 Where Do I place the option Explicit??
By the way, I am sure I read that Option Scrict On is used for 64bit apps. Since it is 100% unlikely anyone has a 64bit CPU .....
Quote: > WRONG! > The default is to require variable declaration and strict casting, but it > can be turned off. > -- > Jonathan Allen
> > You need not use "Option explicit" in VB.Net , > > it alway require variable declaration like C/c++ or other.
> > | Well in VB6 you could place the option explicit in the form general. but > > I > > | cant find that anywhere and I am very curious as to where I can put it. > I > > | read in the help that is is not option explicit {on/off} but it really > > | doesnt help cause I dont know where to put it. > > | > > | It wont let me use the operands "= , / , * , - " using option strict. > > | Apparently option strict is default but I cant find it in the code > > anywhere. > > | > > | Not to mention there is about 200 lines of code for a 10 line prog. > hehe. > > | > > | If anyone can help plz reply. > > | Thanks, > > | Dustin Burda > > | > > |
|
Sun, 01 Jun 2003 00:12:12 GMT |
|
 |
Jonathan Alle #8 / 11
|
 Where Do I place the option Explicit??
I don't know what your getting at. There is suppose to be no such thing as a 64bit VB.Net app. It should be able to read the same IL code that all the other assemblers read. And Option Strict is just a compiler switch to turn off late binding and automatic casting, it has no effect on the IL code. -- Jonathan Allen
Quote: > By the way, I am sure I read that Option Scrict On is used for 64bit > apps. Since it is 100% unlikely anyone has a 64bit CPU .....
|
Sun, 01 Jun 2003 05:03:34 GMT |
|
 |
Zorie #9 / 11
|
 Where Do I place the option Explicit??
Probably not. But, Microsoft has a 64bit computer farm that they are allowing partners to use for development testing. If you do need to test 64bit, then you might want to keep this in mind. -V-
Quote: > By the way, I am sure I read that Option Scrict On is used for 64bit > apps. Since it is 100% unlikely anyone has a 64bit CPU .....
> > WRONG! > > The default is to require variable declaration and strict casting, but it > > can be turned off. > > -- > > Jonathan Allen
> > > You need not use "Option explicit" in VB.Net , > > > it alway require variable declaration like C/c++ or other.
> > > | Well in VB6 you could place the option explicit in the form general. > but > > > I > > > | cant find that anywhere and I am very curious as to where I can put > it. > > I > > > | read in the help that is is not option explicit {on/off} but it really > > > | doesnt help cause I dont know where to put it. > > > | > > > | It wont let me use the operands "= , / , * , - " using option strict. > > > | Apparently option strict is default but I cant find it in the code > > > anywhere. > > > | > > > | Not to mention there is about 200 lines of code for a 10 line prog. > > hehe. > > > | > > > | If anyone can help plz reply. > > > | Thanks, > > > | Dustin Burda > > > | > > > |
|
Mon, 02 Jun 2003 12:11:16 GMT |
|
 |
Zorie #10 / 11
|
 Where Do I place the option Explicit??
Jonathan, You mean that the IL assemblies are not in a pre-bit format right? They get optimized for the platform that pre-jits them, so wouldn't Win64 pre-jit it to 64bit or at least optimize for 64bit, after all the Pre-jit on that platform must at least have Native be 64bit. Yes/No? -V-
Quote: > I don't know what your getting at. > There is suppose to be no such thing as a 64bit VB.Net app. It should be > able to read the same IL code that all the other assemblers read. And Option > Strict is just a compiler switch to turn off late binding and automatic > casting, it has no effect on the IL code. > -- > Jonathan Allen
> > By the way, I am sure I read that Option Scrict On is used for 64bit > > apps. Since it is 100% unlikely anyone has a 64bit CPU .....
|
Mon, 02 Jun 2003 12:14:12 GMT |
|
 |
Jeff Pei #11 / 11
|
 Where Do I place the option Explicit??
Quote: > Jonathan, > You mean that the IL assemblies are not in a pre-bit format right? They get > optimized for the platform that pre-jits them, so wouldn't Win64 pre-jit it > to 64bit or at least optimize for 64bit, after all the Pre-jit on that > platform must at least have Native be 64bit. Yes/No? > -V-
IL Assemblies can be platform neutral (and VB.NET/C# generate platform neutral assemblies), however that does not mean that all IL assemblies are (or will ever be) platform neutral. In the metadata an assembly can be marked as platform specific (this is important, for example, to ME C++ where it isn't purely generating IL code as things like the CRT startup code are still platform-native.) As to "pre-jit" I think you're slightly off the mark. The best way to think of pre-jit is to think of it as nothing more than the normal JIT, except instead of translating each method as it is called at run time, the pre-jit acts as if each method in the assembly has been successively called. In either case as the JIT compiles methods the emitted native code can be cached persistently for future calls to the method (thus PreJITing does not alter the assembly containing IL, it merely puts native code for the assembly's methods in it's cache, which preserves xcopy semantics for the assembly.)
|
Mon, 02 Jun 2003 12:43:56 GMT |
|
|
|