Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Evaluate() Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00768800
Message ID:
00769306
Vues:
24
Then I can assume you figured out you could enter your value from the property window as:
=".T."
>Hi Fred
>
>I found the problem. It has to do with how the properties are interpreted when entered in the properties window. If I enter .T. the property is set to a logical type which I do no want. If I enter ".T." the property is a character type but includes the quotation marks which I do not want. What I want is a character string of three characters .T.
>
>I did not realize that when I entered the value with quotes the quotes would be part of the string and that is what caused the problem. I should have realized this because I have been caught by this several times in the past.
>
>Simon
>
>>>I had the following two properties set as follows:
>>>
>>>This.cWhereBase="PID=' '.Or.PID$This.cOpenNodes"
>>>This.cWhereUser=".T."
>>>
>>>The following code fails with an error message (Function argument value, type or count is invalid.):
>>>
>>>Scan While .T. for Evaluate(This.cWhereBase+".And."+This.cWhereUser)
>>>
>>>However if I change This.cWhereUser as follows everything works fine:
>>>
>>>This.cWhereUser="1=1"
>>>
>>>In the first case in the debugger evaluate(This.cWhereUser) returns at character type expression of '.T.' when I expected a logical value.
>>>
>>>Is this a bug or just the way the evaluate function works? It seems like it did not evaluate the ".T."
>>>
>>>Thanks
>>>Simon
>>
>>Seems to work OK for me when I try it.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform