Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Let's see
Message
From
30/03/2021 10:22:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/03/2021 10:12:44
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01679334
Message ID:
01679352
Views:
66
>>>
lcString="ABC,DEF,GHI,JKL"
>>>lcString2=""
>>>x=0
>>>do while x<len(m.lcString)
>>>  x=m.x+1
>>>  IF SUBSTR(m.lcString,m.x,1)<>","
>>>    lcString2=m.lcString2+substr(m.lcString,m.x,1)
>>>  ENDIF
>>>enddo X
>>>?m.lcString2
>>
>>I get ABCDEFGHIJKL, is that a surprise? Apart from showing that Substr() accepts 0 for the start position, I mean?
>
>My code does not show that substr accepts 0 for the start position.

Premature optimization brings one to zero... um, brings one to interesting results.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform