Gustav Brock
gustav at cactus.dk
Tue May 4 02:22:26 CDT 2004
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