[AccessD] Early Friday Untip

DWUTKA at marlow.com DWUTKA at marlow.com
Tue May 4 09:28:02 CDT 2004


Ya, no kidding.  The writer of that may think that the dreaded 'overflow'
error may be bad, wait until they get goofy numbers from floating point
calculations!

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Gustav Brock
Sent: Tuesday, May 04, 2004 2:22 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Early Friday Untip


Hi all

Just noticed this "untip" from Element K Journals".

Comments should not be necessary, but where did Val() and CLng() go?
Why not let a programmer proofread such tips?

<quote>

Beware of CInt; use CDbl instead (VB 6.0)

If you have any program that converts string values to numbers, 
you'll want to steer clear of the CInt function and use CDbl 
instead. The problem with CInt is that it only accepts numbers 
up to 32767. You might say today, "My number will never get that 
large." However, later on down the line, it might. 
Unfortunately, by that time, your code may be riddled with 
hundreds of CInt time bombs waiting to blow up, displaying the 
dreaded Overflow error. Using the CDbl function is no different 
from using CInt. The syntax is:

CDBl(numericstring)

CDbl returns the same value as CInt and it accepts num-bers up 
to 1.7976931348623158E+308.

</quote>


/gustav

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