Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spiltting the address into three
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00337565
Message ID:
00337668
Views:
19
Charles,

How about something like the following:

lcString = "12345 ABC ST"
A = getWord(@lcString)
B = getWord(@lcString)
C = getWord(@lcString)
? Addr1, Addr2, Addr3

function getWord
lparameters tcString
local lnPos, lcWord
lcWord = space(0)
if !empty(tcString)
tcString = alltrim(tcString)
lnPos = at(" ", tcString)
if lnPos > 0
lcWord = alltrim(substr(tcString, 1, lnPos))
tcString = alltrim(substr(tcString, lnPos))
else
lcWord = alltrim(tcString)
tcString = space(0)
endif
endif
return lcWord



>I'm sure someone has done this before. Looking for some quick code...
>
>Address: 12345 ABC ST
> 123 NBC AVE
> 1432 CBS DR
>
>Have to trun each in thre delimited fields.
>
>The syntax i've been working with goes something like"
>A = substr(property.address, 1," ")
>B = sbustr ( property.addresws, " ", " ")
>C = substr(property.address, (find where the streetname stops), (where the street suffix begins))
>
>Anybody got some code laying on in a drawer somewhere that does this?
>
>Thanks
>CMH.
Bud Wheeler
Vision Data Solutions, Inc.
Microsoft Partner

http://www.visionpace.com
Http://www.BudWheeler.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform