Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding a MOD9 formula
Message
De
05/09/2012 11:03:45
 
 
À
05/09/2012 10:47:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01552174
Message ID:
01552409
Vues:
50
>Actually I was just trying this code and keep getting "Operator/operand type mistmatch":
>
>
proIn = 61227660  &&RLCA
>
>lnDigit = m.proIn - (INT(m.proIn / 9) * 9)
>		chkdig = 9 - lnDigit
>		
>??proIn + chkdig+CHR(13)+CHR(10)
>

>It must have something to do with the proIn field because the chkdig is generated fine by itself.

(1)

You cannot add a string to a numeric


(2) This is a bit simpler
	proIn = 61227660  &&RLCA
	chkdig = 9 - mod(m.proIn, 9)
	?proIn + chkdig
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform