Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I shorten code this?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00314481
Message ID:
00314492
Vues:
29
lnNbFields = AFields(laStruct, "MyTable")
llFound = .F.
lnI = 1

DO WHILE (lnI <= lnNbFields) AND NOT llFound
   llFound = Evaluate(laStruct[lnI, 1]) = "Y"
   lnI = lnI + 1
ENDDO

IF llFound
   *-- Do whatever
ENDIF
HTH
>I am looking for a shortcut way to do this.
>Thanks in advance and then some.
>
>IF mytable.my_field1 = "Y" OR ;
> mytable.my_field2 = "Y" OR ;
> mytable.my_field3 = "Y" OR ;
> mytable.my_field4 = "Y" OR ;
> mytable.my_field5 = "Y" OR ;
> ...(do whatever)
>ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform