Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking string for predefined format
Message
 
 
To
10/08/2000 13:56:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00403485
Message ID:
00403541
Views:
22
>PMFJI
>TRANSFORM() doesn't transform character strings, so this always returns .T.
>
>>Nadya -
>>
>>I haven't tried this but I think it should work. The expression:
>>(lcMyAPN = TRANSFORM(lcMyAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
>>should return .T. if the APN matches the format string.
>>
Strange, but these are my tests:
lcAPN = "123456A-B789012C-D345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcAPN = "a123456A-B789012C-D345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcAPN = "a123456A-B789012C-D345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcAPN = "123456AA-B789012C-D345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcAPN = "123456AB789012C-D345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcAPN = "123456A-B789012CD345678EF-GH901234I-KLMNOP"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))
lcApn="999999X-X999999X-X999999XX-XX999999X-XXXXXX"
?(lcApn= TRANSFORM(lcAPN, "999999X-X999999X-X999999XX-XX999999X-XXXXXX"))

Undocumented feature?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform