Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Separate a group of number
Message
From
14/05/2019 03:26:00
 
 
To
14/05/2019 00:56:16
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01668589
Message ID:
01668591
Views:
63
>what is the easiest way to separate a group of numbers into fields?
>this is for disc% (up to 8 levels)
>
>eg:
>2+5+6+2+4+7+4
>
>into:
>
>disc[1]= 2
>disc[2]= 5
>disc[3]= 6
>disc[4]= 2
>disc[5]= 4
>disc[6]= 7
>disc[7]= 4
>disc[8]= 0
>
>Thank you
>
>Jerry Yang
lcString = '2+5+6+2+4+7+4'
ALines(Disc,lcString,0,'+')
If the array must have 8 elements each time:
lcString = '2+5+6+2+4+7+4'
lcString = Padr(lcString,15,'+0')
ALines(Disc,lcString,0,'+')
Previous
Reply
Map
View

Click here to load this message in the networking platform