Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AND and OR evaluations in conditional statements
Message
De
11/04/1999 19:40:35
 
 
À
09/04/1999 21:18:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206066
Message ID:
00207335
Vues:
12
Jim, it is I who is thick and you are 100% correct.
I need a holiday
Thanks

>SNIP
>
>Dave,
>
>Call me thick, but I don't see what you are getting at...
>
>I would expect the second to evaluate T, being evaluated from left to right because I see its alternate form as " .t. or (.t. and .F.) ". So I guess I would call it 'precedence' if one means that the "AND" word is *considered first* in relating the operands to operators, but I would still say that evaluation proceeds from left to right once those decisions have been made.
>
>What I am trying to say is that the operators seem to be evaluated/considered in the order as documented but the actual evaluation of the expression then proceeds from left to right. Both of your examples would support that, wouldn't they?
>
>Cheers,
>
>Jim N
>
>
>>
>>Jim,
>>Try this,
>>? (.t. or .t.) and .F.
>>? .t. or .t. and .F.
>>
>>AND has precedence over OR, the second expression returns .T.! The first expression forces left to right evaluation.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform