[AccessD] Global Variable

Gustav Brock Gustav at cactus.dk
Tue May 17 12:39:49 CDT 2005


Hi John

Yes, I prefix our globals with a p for Public. That stopped all
confusion.
I've considered prefixing a Static with an s but decided not to.

/gustav

>>> jwcolby at colbyconsulting.com 05/17 7:28 pm >>>
Gustav,

Believe me, I AM my own ghost writer on many occasion.  Sometimes we
just do
things because it is the right way to do things.  I have found that I
can do
things by habit or I can "have to think about doing things".  

One of the things I learned to do "by habit" long ago was always use a
case
else.  If you expect 10 difference cases, then specify those cases, but
USE
AN ELSE where you place an error message.  If it falls into the else,
then
you didn't expect it and you will be notified that your code is doing
unexpected things.  To some of our esteemed associates that might seem
like
wasted keystrokes, but if you are notified automatically you can save
hours
of head scratching when some bizarro case buried in the bowels of your
code
happens unexpectedly.

I dim my variables with a naming convention by habit.  The habit was a
little difficult to start using but after that it just fell into place
and
it always happens.  I use variable scope as a programming habit.  There
is
still a millisecond "thought process" to figure out the scope, or the
naming
prefix, but the actual "doing of it" is automatic.  

My personal opinion is that if I am going to use any convention, then
the
"doing of it" has to be habit, or it is sporadic and in the end not
very
useful.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/ 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com 
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav
Brock
Sent: Tuesday, May 17, 2005 1:06 PM
To: accessd at databaseadvisors.com 
Subject: RE: [AccessD] Global Variable


Hi John

I see your point, just wondering who are these "anyone"? 
No ghostwriters are writing to my globals.

/gustav

>>> jwcolby at colbyconsulting.com 05/17 6:19 pm >>>

>If you are not saying that they 'go away' as an argument, why do you
consider them 'bad practice' still?

Because anyone anywhere can overwrite them.  ..
-- 




More information about the AccessD mailing list