Re: Option Explicit
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Jun 2007 15:21:37 -0400
Actually, I suspect it will be slightly faster to have all of the variables
declared, as Access will have reserved memory for all of them in advance,
rather than having to reserve memory as they're encountered. I doubt,
however, that the difference will be that significant.
However, as we've all told you, you personally can save hours of effort
trying to debug your code when it isn't working properly if you use Option
Explicit and declare your variables.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Warrio" <warrio@xxxxxxxxxxx> wrote in message
news:46782b64$0$3821$5402220f@xxxxxxxxxxxxxxxxxx
So the statement written in the Performance Analyser tool "Using an Option
Explicit statement will enable your code to run faster." is wrong?
does it deal only with the compling time or also with the runtime?
"Rick Brandt" <rickbrandt2@xxxxxxxxxxx> a écrit dans le message de news:
ZSVdi.20554$C96.19386@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Warrio wrote:
Thanks for your quick answer! but sorry I forgot to mention in which
way it would help Access to run my code faster ?
and so far, I'm happy to have the choice to declare or not my
variables and set their type, but I'm ready to change my habits ONLY
if it can help my forms run and load faster (you made your choice, I
can have a different one) ...
the main part of my forms performances is dealing with the sql
requests and actions. but how much will I win if I use "Option
Explicit" knowing that today users have 1 to 2 GB processors...
Thanks again!
It has nothing to do with speed. It has to do with catching silly typing
errors at compile time instead of having them fail at runtime.
If you like taking silly risks then go ahead and leave it out.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
.
- Follow-Ups:
- Re: Option Explicit
- From: Warrio
- Re: Option Explicit
- References:
- Option Explicit
- From: Warrio
- Re: Option Explicit
- From: Marshall Barton
- Re: Option Explicit
- From: Warrio
- Re: Option Explicit
- From: Rick Brandt
- Re: Option Explicit
- From: Warrio
- Option Explicit
- Prev by Date: Re: Option Explicit
- Next by Date: Re: Is it Possible??? Search Engine???
- Previous by thread: Re: Option Explicit
- Next by thread: Re: Option Explicit
- Index(es):
Relevant Pages
|
Loading