Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exercicio - extrair numeros de sting
Message
De
06/01/2003 15:02:38
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brésil
 
 
À
06/01/2003 13:27:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00738448
Message ID:
00738519
Vues:
14
Olá!

No VFP6 não tem o StrExtract, segue abaixo código para o VFP6 ou posterior.
Clear
Local lcString, lnPosVirg
lcString = "18,21,33,45,150,999"
? lcString
DO while Len(lcString) > 0
  lnPosVirg = At(",", lcString)
  lnPosVirg = Iif(lnPosVirg = 0, Len(lcString) + 1, lnPosVirg)
  ? Int(Val(Substr(lcString, 1, lnPosVirg - 1)))
  lcString = Substr(lcString, lnPosVirg + 1)
EndDo
Até mais.
Erick
Força Sempre!
Strength Always!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform