Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MOD()
Message
From
13/07/1999 11:56:23
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
MOD()
Miscellaneous
Thread ID:
00240784
Message ID:
00240784
Views:
71
Does the way MOD() (or "mod 7") works is the digits must be 6 (via, 123456) or it must have a character and then 6 digits (via, A123456)? So, is the correct way to check/verfiy it is (this formula is for with a character and then 6 digits):

STORE SUBSTR(num,2,5) TO no
STORE MOD(VAL(no),7) TO chk
IF SUBSTR(STR(chk),10,1) = SUBSTR((no,7,1)

ELSE

ENDIF

Is that correct? I am puzzled with my supervisor saying it is the 4 digits, but the old program that I am looking uses 5 digits. I am all new to this. I never learned "mod 7" before.

Chuck
Today is tomorrow's yesterday.
Next
Reply
Map
View

Click here to load this message in the networking platform