Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to get this result?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00651242
Message ID:
00651744
Views:
20
>>>>What I'm trying to achieve is a single, quick test that will compare 2 sets of states and give the following results:
>>>>
>>>>State1 State2 Result
>>>> T       T      T
>>>> T       F      F
>>>> F       T      T
>>>> F       F      T
>>>>
>>>>The first state indicated if something if being used and the second if access is granted. I really want to do this check when creating nodes for a treeview so speed is quite important.
>>>>
>>>>Can anyone point me to a solution?
>>>>Thanks in anticipation.
>>>
>>>What about:
>>>result = iif(state1==state2,.t., state2)
>>>
>>>Einar
>>Einar,
>>I don't think that will cover option 3 but thanks for the input, I believe I have a solution from Cetin.
>
>It should cover all the cases you describe.
>Please show me how it fails to cover option 3.
>Option 3: State1 = .F. and State2 = .T.
> result = iif(state1==state2,.t., state2) = .T.
>Which is what you listed in your 'table'.
>As for speed my solution would be a lot faster.
>
>Einar
Einar my sincere apologies I read your message very quickly (thinking I already had the solution) and missed the point you where making. Yes it does do what I requested and appears to be a quick option so my thanks and sorry for my previous reply.
Caroline
Caroline
Previous
Reply
Map
View

Click here to load this message in the networking platform