Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Spiltting the address into three
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00337565
Message ID:
00337672
Vues:
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
>

Reposted to see if I could improve formatting.

>
>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform