Charlotte Foust
cfoust at infostatsystems.com
Thu Aug 5 15:50:49 CDT 2004
Apparently I'm not making *myself* clear. What is the order of savings between the integer and the long in that loop, and who cares? Neither is going to be noticeable, but if your shop standards say you use the smallest possible datatype appropriate for the operation, then you use an integer for a loop that doesn't require a long. I prefer to avoid floating point creep, but a currency type is larger than a single, so I'm forced by our requirements to use a single where I would rather not. However, if I take the approach that we *always* use singles for this so I don't have to make it obvious, I am a NAUGHTY developer with a high and mighty attitude because I really should know that there is no such thing as ALWAYS and other developers have to be able to read my code without difficulty!! Charlotte Foust -----Original Message----- From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] Sent: Thursday, August 05, 2004 12:41 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Naming Conventions Because: Dim i As Long Do until i=100 i=i+1 loop Runs faster then Dim i as Integer Do Until i=100 i=i+1 Loop Why declare a counter with a prefix? If you are using an integer, for 'smaller' counts, then whether you are using a prefixed variable or not, you're still missing the point. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Thursday, August 05, 2004 3:19 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Naming Conventions But you see, I have to rationalize that in order to guess that you've used a long. If the loop only requires an integer up to 100, why use a long "of course"? If you declared the variable with a prefix or even a type declaration character, it wouldn't require anyone else to try and guess what you were thinking. Charlotte Foust -----Original Message----- From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] Sent: Thursday, August 05, 2004 11:11 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Naming Conventions Long of course. Why would you use byte or Integer in a 32 bit environment? A 32 bit Long Integer will out perform the other two! In fact, the only reason to use other numbers, is to confirm with API calls, when necessary. Other then that, there is no reason to use them. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Thursday, August 05, 2004 1:14 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Naming Conventions Byte, Integer or Long? Any of them can be counters. Counter is a non-definitive term for a value, and I object to that kind of coding. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Thursday, August 05, 2004 8:23 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Naming Conventions Me too, Drew. In my code, anything named i j or k immediately signals that's all it is, a counter. A. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com Sent: Wednesday, August 04, 2004 5:15 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Naming Conventions What's wrong with: For I=1 to 50 Next I ? Drew -- _______________________________________________ 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 -- _______________________________________________ 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