Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF
Message
From
02/04/2001 16:25:58
 
 
To
02/04/2001 16:15:22
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: IIF
Miscellaneous
Thread ID:
00491068
Message ID:
00491073
Views:
11
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform