Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If Then & Do Case Syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00960036
Message ID:
00960058
Vues:
8
Bjarne,

You can use any logical expression:
if ( 1 = 2 ) or ( 3 = 4 )
then
   ? "then block is run"
else
   ? "else block is run"
endif
Most often in VFP though you don't find people using the THEN keyword because it is optional:
if ( 1 = 2 ) or ( 3 = 4 )
   ? "then block is run"
else
   ? "else block is run"
endif
>Does VFP7.0 permit multiple conditions for the If/Then & DoCase conditions e.g.,
>if table1.field1 = 1 and table2.field3 = 4 and form1.bwlst1.value=3
> then execute
>endif
>
>OR
>
>do case
> case table1.field1 = 1 and table2.field3 = 4 and form1.bwlst1.value=3
> then execute
> case 2
>endcase
>
>I can't find any discussion of this in the VFP reference or Hentzen's book.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform