[AccessD] Naming Conventions

Brett Barabash BBarabash at TappeConstruction.com
Thu Aug 5 10:55:05 CDT 2004


> I would have been silent.
Wow!  I actually found something that would silence Gustav.  Gotta make
a note of that... ;-)

> So, you would prefer the syntax:
>  If I = 2 Then
>    ' Do stuff
>  End If I

Two points here:
First of all, that's not valid VB(A) syntax, so it's pretty hard to
truly comment on what I "prefer", since I couldn't have possibly used
that construct and formulated an opinion based on experience.  Right???

However, this is an easy one since your example is clearly not analogous
to what I stated.

A For...Next loop corresponds to a single loop variable.  If statements,
Do...While loops, etc. are tied to conditions (I = 2, strLastName =
"Jones", etc.), not variables.  If I place the letter I next to the End
If, it isn't very helpful since it is the condition (I = 2) that is the
basis of the code block.  

Repeating the entire condition string at the bottom of the block would
be far too wordy and the code maintainance required would outweigh its
benefit.
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Thursday, August 05, 2004 10:02 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Naming Conventions

Hi Brett

OK, it's not Friday yet but I did read what you wrote: especially.

>> Makes a huge difference, especially when dealing with nested loops.

Had you written:

>> Makes a huge difference when dealing with nested loops.

I would have been silent.

So, you would prefer the syntax:

  If I = 2 Then
    ' Do stuff
  End If I

Now, did I qualify for joining Arthur's "Club of Pendants"??

/gustav


>> A huge difference - and added readability - for a single loop?
>> Is that you Brett?

> Um, take a moment to read my response before jumping all over it.  I
> said:

>> Makes a huge difference, especially when dealing with nested loops.

> And yes, it does make a difference, even with a single loop.  I don't 
> have to scroll up a page of code to find the loop variable name, hence

> improved readability.

> But folks, Gustav is absolutely correct.  It is not NECESSARY to 
> specify the variable name in a Next statement.  Nor is it NECESSARY to

> comment your code or use consistent naming conventions.  Some of us 
> just do these things for our own *special* reasons ;-)
 

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav 
> Brock
> Sent: Thursday, August 05, 2004 8:48 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Naming Conventions

> Hi Brett

>>>You don't need the last I; Next will do.

>> While you don't NEED the last I, many developers include it for 
>> readability sake.  Makes a huge difference, especially when dealing 
>> with nested loops.

> A huge difference - and added readability - for a single loop?
> Is that you Brett?

> /gustav

> PS:
> --------------Please open with care!------------ This message will 
> bypass some of your spam filtering rules.

>> -----Original Message-----
>> From: accessd-bounces at databaseadvisors.com
>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav 
>> Brock
>> Sent: Thursday, August 05, 2004 3:51 AM
>> To: Access Developers discussion and problem solving
>> Subject: Re: [AccessD] Naming Conventions


>> Hi Drew

>>> What's wrong with:

>>>  For I=1 to 50
>>>
>>>  Next I

>> You don't need the last I; Next will do.

>> /gustav

--

--------------------------------------------------------------------------------------------------------------------
The information in this email may contain confidential information that 
is legally privileged. The information is only for the use of the intended 
recipient(s) named above. If you are not the intended recipient(s), you 
are hereby notified that any disclosure, copying, distribution, or the taking 
of any action in regard to the content of this email is strictly prohibited.  If 
transmission is incorrect, unclear, or incomplete, please notify the sender 
immediately. The authorized recipient(s) of this information is/are prohibited 
from disclosing this information to any other party and is/are required to 
destroy the information after its stated need has been fulfilled.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Tappe Construction Co.

This footer also confirms that this email message has been scanned
for the presence of computer viruses.Scanning of this message and
addition of this footer is performed by SurfControl E-mail Filter software
in conjunction with virus detection software.




More information about the AccessD mailing list