[AccessD] Global Variable

DWUTKA at marlow.com DWUTKA at marlow.com
Tue May 17 13:48:31 CDT 2005


LOL.....

Drew

-----Original Message-----
From: Gustav Brock [mailto:Gustav at cactus.dk]
Sent: Tuesday, May 17, 2005 12:40 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Global Variable


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.  ..
-- 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list