[AccessD] Naming Conventions

James Barash James at fcidms.com
Tue Aug 10 16:49:41 CDT 2004


I'm not sure if this is progress but in VB.net you can define a variable as
part of the For...Next  statement:

For i as Integer = 0 to 90
' do something here
Next i

i only exists within the scope of the For...Next loop


James Barash

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim
Sent: Tuesday, August 10, 2004 3:02 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Naming Conventions

Do you always dim your variables at the top of the routines? I got in that
habit sometime ago but it occurs to me 
"dim i as integer" at the start of a loop might solve the "what type is it"
issue.

Jim Hale

-----Original Message-----
From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
Sent: Tuesday, August 10, 2004 10:30 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions


Yep.  I do it, and my boss hates it, although the other developers
appreciate it.  My boss feels that that extra green text makes the code
*hard* to read and is unnecessary is short routines.  My feeling is that
I never know what might get inserted into the middle and it's easier to
keep track if you comment the code when you write it.  I had an
instructor who insisted on this kind of commenting even for declarations
and at the end of a function or sub.

Charlotte Foust


-----Original Message-----
From: Scott Marcus [mailto:marcus at tsstech.com] 
Sent: Tuesday, August 10, 2004 3:21 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Naming Conventions


I forget who mentioned something like this...

If I < 90 Then
   'some code here
End If 'I

but I SOMETIMES do the following in complex code...

If intEmployeeType < ADMINISTRATOR Then
   'some code here
End If 'intEmployeeType < ADMINISTRATOR

Anyone else do this?

I usually just break up the complex code into functions/procedures.

Scott Marcus

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
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