Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aphanumeric sorts VFP XP?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Aphanumeric sorts VFP XP?
Miscellaneous
Thread ID:
00692368
Message ID:
00692368
Views:
68
This all began when a customer wanted our software to retrieve information between bins like they do on the mainframe.

Standard VFP sort/between:
a1
a100
a1000
a10a
a1a
a2
a20

This is the how it works in VFP currently. Although the customer wants to be able to select data from a1 through a20 and just get a1,a1a,a2,a20. Which I told him it was impossible. He pointed out that in WinXP can do it with files. So I started looking into it and WinXP does not sort files in same way character based sorts work. You can create a folder on disk in the folder put some files without extensions. Name them a1,a100,a1000,a10a,a1a,a2,a20. Click views details sort by name and it puts them in the "logical" order.

a1
a1a
a2
a10a
a20
a100
a1000

Does anyone know how they are doing this? I have tried padding, alltriming right and left. I think the only way to do this is break each character out and store them padded to a fixed length. Then use a standard sort. I have looked for it on the Microsoft site, but can not find anyplace they describe this. It really starts getting weird when you throw special characters in like {,[,# into the names.

Any ideas?

Dale
Next
Reply
Map
View

Click here to load this message in the networking platform