Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding a MOD9 formula
Message
From
05/09/2012 11:03:45
 
 
To
05/09/2012 10:47:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01552174
Message ID:
01552409
Views:
51
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform