Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide variable into parts
Message
From
09/02/2008 11:51:26
 
 
To
09/02/2008 11:44:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01266627
Message ID:
01291068
Views:
7
>>Dragan gave you a solution.
>
>Which I don't really like. Not at all - it creates 15 variables for no good reason. And then there needs to be code which will use these variables, which will also have to check for their existence first. Ugly, and unnecessarily complicated.
>
>>But I will repeat that an array is easier and "cleaner". With my earlier code var(1) is '3', var(2) is '1' and so on.
>
>Sure is... and reading that this is for a report, I smell a kludge. But I was also too tired/lazy to recheck the whole thread, so I let it go as is. I had some deja vu, though - sounds like we've been through this once before. But we all get those often, no big deal.

I must confess that I missed the report part. For a report you usually can use the transform function. For instance transform(yourvar,'@R 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9') will show '1234567890-1234' as '1 2 3 4 5 6 7 8 9 0 - 1 2 3 4'.
Previous
Reply
Map
View

Click here to load this message in the networking platform