Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple arguments for $ function
Message
De
29/07/2008 00:20:30
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01334620
Message ID:
01334781
Vues:
7
This message has been marked as a message which has helped to the initial question of the thread.
>I would like to use multiple arguments for $ , but it returns error message:
>
>
>IF "DEPÓSITO" .or. "DEPOSITO" .or. "COMPROVANTE" .or. "PAGAMENTO" $ UPPER(emails.assunto ).and. EMPTY(emails.tipo)

Simpler to turn it around:
lFound=.f.
for i=1 to getwordcount(emails.assunto)
   lfound=lFound or inlist(upper(getwordnum(emails.assunto,i)), ;
      "DEPÓSITO", "DEPOSITO", "COMPROVANTE", "PAGAMENTO" )
   if lfound
      exit
   endif
endfor
return lFound
This could be made a bit shorter, maybe, and may need some tweaking (you may need an extra parameter for getw* functions - if .assunto can have punctuation, than the default space is not the only word delimiter, i.e. the code as is would not find "-deposito" or "comprovante,").

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform