Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving 10 center characters from string
Message
 
 
To
04/06/2008 04:35:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01321512
Message ID:
01321556
Views:
16
lcDigits = "0123456789"
lcBarcode = "***123456-789***"

lcResult = CHRTRAN(lcBarcode, CHRTRAN(lcBarcode, lcDigits, ""), "")
IF LEN(lcResult) <> 9
	? "Invalid Barcode"
ENDIF	
>
>I have to read Barcode.
>I have to get 10 character with the following format 123456-789 (6 digits, dash +3 digits) .
>My clients use with few bar readers that each one retrieve the results, but adding different characters for safe.
>
>for example:
>*123456-789*
>c123456-789c
>*c123456-789c*
>***123456-789***
>123456-789
>
>I want to get always the 10 center characters.
>In addition, I want to be sure that all the rest not digits (how to run isdigit function).
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform