-
Oct 15th, 2019, 03:04 PM
#1
[RESOLVED] Option Explicit Ignored
Ok, a really weird one.
I just installed the IDE on a Win10-64 machine (yeah, we've got plenty of licenses), I fire up a new project, start a new BAS module, and then type this:
Code:
Option Explicit
Sub Test()
asdfasdf = 5
End Sub
And I've also made sure the "Background Project Load" is NOT on.
But the project still runs. What's the deal? Anyone seen this.
Thanks In Advance,
Elroy
EDIT1: I feel like I'm losing it when I see these things.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Oct 15th, 2019, 03:09 PM
#2
Hyperactive Member
Re: Option Explicit Ignored
But Compile on Demand is turned on, right? Is that module actually called anywhere?
Also, Ctrl-f5 would probably catch it even if the regular IDE run missed it. I've had plenty of bad code get temporarily accepted if I'm not doing a full compile yet.
Last edited by ahenry; Oct 15th, 2019 at 03:15 PM.
-
Oct 15th, 2019, 03:13 PM
#3
Re: Option Explicit Ignored
ahenry beat me to it. It won't trigger unless the routine is entered or "Start With Full Compile"
-
Oct 15th, 2019, 03:54 PM
#4
Re: Option Explicit Ignored
Ok, no, the Sub Test is not being called anywhere.
But, I'm still confused on a couple of counts.
For one, I thought turning OFF the "Compile On Demand" was the same as forcing a "Start With Full Compile". In other words, if "Compile On Demand" is off, F5 = Ctrl-F5.
And, here's something even weirder. On my development laptop, I've got "Compile On Demand" turned OFF, and it won't run (p-code) or compile. And I compared every setting in Tools --> Options... and everything is exactly the same between the two machines.
The VB6 IDE installation is acting a bit weird on the new computer. Occasionally when just firing up VB6, it'll hang. A Ctrl-Alt-Del and kill it, and then try again usually works. And it only hangs on occasion. But I've seen that before. In fact, that happens once in a blue moon on my development laptop.
Still at a loss,
Elroy
And ohh, yes Ctrl-F5 does catch it on the new machine. So, clearly it's not doing a "Start With Full Compile" on this new machine.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Oct 15th, 2019, 05:59 PM
#5
Re: Option Explicit Ignored
The background compile should only be available if compile on demand is turned on.
If the compile on demand is turned off then I would expect it to behave as it does when starting with full compile.
I am not sure I have ever set the option here as I like the quick run ability and full compile when desired, saves a lot of time when testing larger projects.
-
Oct 15th, 2019, 08:28 PM
#6
Re: Option Explicit Ignored
VS/VB6 is licensed to the developer, not the machine.
It can't be shared. If you have 100 programmers you need 100 licenses, even if you only have one PC.
-
Oct 16th, 2019, 01:24 AM
#7
Member
Re: Option Explicit Ignored
Have you installed SP6?
-
Oct 16th, 2019, 07:41 AM
#8
Fanatic Member
Re: Option Explicit Ignored
Have you compared the Add-ins, and which one is loaded? Maybe their order matter?
Also, probably unrelated, but VB6 features function-level linking(verified by checking assembly output), which means that because your Sub Test is not being called from anywhere, the linker will not include its code in the EXE. However, I think you should have gotten a compile time error. You could try calling it and see if that makes any difference.
-
Oct 16th, 2019, 07:59 AM
#9
Re: Option Explicit Ignored
Originally Posted by dilettante
VS/VB6 is licensed to the developer, not the machine.
It can't be shared. If you have 100 programmers you need 100 licenses, even if you only have one PC.
I get so tired of self-appointed policing. I hold at least 4 licenses to VB6, and the client I'm at holds 2 of his own. And, there are only two of us that are programmers. So, I believe the license issue is covered. It's like that case in Florida where the guy just got convicted for shooting another guy who shoved him over a handicapped parking space. The judge made the declaration that handicapped parking signs are only for two groups of people, the person parking in the spot and the police, and that nobody else needs to worry about them. Therefore, Dil, if you're worried about my VB6 licenses, please report my post to VBForums, or my license usage to Microsoft.
Now, if we can get back on topic...
@dseaman: Yes, I always install SP6 immediately after any VB6 IDE installation.
@DataMiser: I'm not sure I know where to ... wait, you solved the problem. I was getting "Background Project Load" confused with "Compile On Demand" in the options. I've now got "Compile On Demand" turned off, and everything is working as desired. Thank You!
-----
Ok, all resolved now.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|