[AccessD] explicit type

Jim DeMarco Jdemarco at hshhp.org
Thu Oct 2 10:04:03 CDT 2003


I've only just got into that habit in the past year or so.  A lot code in articles and books seems to be written without explicitly typing constants especially with regard to API calls.  Maybe that's got a bit to do with it (not blaming authors here just making an observation).

Jim DeMarco
Director of Product Development
HealthSource/Hudson Health Plan


-----Original Message-----
From: John B. [mailto:john at winhaven.net]
Sent: Thursday, October 02, 2003 10:51 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] explicit type


Stuart,
Thanks, I can't even remember what my issue was now, wrote that a 2:00 AM...

I ran FMS Analyzer on an app and found that none of my constants have ever
been explicitly typed - even those from procedures I obtained from other
people, ADH, etc. Maybe that was the issue: Why don't they do it why?

JB

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart
> McLachlan
> Sent: Thursday, October 02, 2003 4:39 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] explicit type
>
>
> On 2 Oct 2003 at 1:56, John B. wrote:
>
> > Just cleaning some code and I was wondering how much difference
> is it going
> > to make if I declare this:
> > Const conPropNotFoundError = 3270
> > If Err = conPropNotFoundError Then...
> > versus this:
> > Const conPropNotFoundError as Long = 3270
> > If Err = conPropNotFoundError Then...
> >
>
> If you don't declare it explicitly, it will be declared as a Variant
> with all of the overhead of storing/interpreting variants.
>
> How much depends on how you are using it. The more you use the
> constant, the more overhead you incur.  As a general rule -  declare
> all variables and constants as the most efficient data type for its
> purpose and only use variants if they are unavoidable.
>
>
>
>
>
>
>
>
> --
> Lexacorp Ltd
> http://www.lexacorp.com.pg
> Information Technology Consultancy, Software Development,System
> Support.
>
>
>
> _______________________________________________
> 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


***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************



More information about the AccessD mailing list