Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF
Message
De
02/04/2001 16:25:58
 
 
À
02/04/2001 16:15:22
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: IIF
Divers
Thread ID:
00491068
Message ID:
00491073
Vues:
10
IIF() returns the evaluation of the expressions in the 2nd and 3rd parameters, in your example, it would either
1) return .T. or .F., depending on the existing value of m.delegated,
2) or throw and error that m.delegated didn't exist

To get what you want with IIF(), do
m.delegated = IIF(org.delegated, 'Y', 'N')
m.contract = IIF(org.contract, 'Y', 'N')
>What's wrong here?
>
>IIF(org.delegated,m.delegated='Y',m.delegated='N')
>IIF(org.contract,m.contract='Y',m.contract='N')
>
>
>This below works, but why not IIF?
>
>IF org.delegated
>	m.delegated='Y'
>ELSE
>	m.delegated='N'
>ENDIF
>IF org.contract
>	m.contract='Y'
>ELSE
>	m.contract='N'
>ENDIF
>
>
>Chuck
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform