Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide variable into parts
Message
From
05/11/2007 10:58:46
 
 
To
05/11/2007 10:03:31
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:
01266721
Views:
8
>>>Dear Experts
>>>
>>>myid=31206-1653228-5
>>>
>>>It is character type variable.
>>>I wnat to devide it into FIFTEEN parts, every character will be a new variable as
>>>
>>>var1=3
>>>var2=1
>>>var3=2
>>>
>>>How is it possible
>>>
>>>Please help
>>
>>Don't use fifteen variables, use an array.
>>
>>myid="31206-1653228-5"
>>Declare var(Len(myid))
>>For x=1 to len(myid)
>>  var(x)=Substr(myid,x,1)
>>EndFor
>
>Now this was one thing that was simpler to do in Cobol... because you had to define your records, and could redefine any field in it in any number of levels.

Not that I remember much of the Cobol language anymore, but this is one of the few things I remember, and miss from time to time.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform