Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with numeric overflow (again!)
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem with numeric overflow (again!)
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00964813
Message ID:
00964813
Vues:
31
Hi everybody,

I decided to fix one old application of mine (received it recently from colleague and found bunch of bugs/problems). I am having a numeric overflow error on this piece of code
for i=1 to m.lCount
	lnSum = evaluate('curtemp.' + sumfields[m.i,1]) + evaluate('m.'+sumfields[m.i,1])
	replace ('curtemp.' + sumfields[m.i,1]) with m.lnSum in curtemp
endfor
it bombs on the field NumBldgs, which is N(1) and lnSum = 10.

I'm thinking what would be the best method to deal with this problem? Using try / catch and in case of error substitute lnSum with the max value allowed for the field? What's the simplest way to determine field's max size?

Could you please help me here?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform