Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF() error
Message
De
18/06/1999 08:08:57
 
 
À
17/06/1999 20:10:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00230164
Message ID:
00231282
Vues:
23
How about !field > '' ? That should be ok, or !field == '' right?

Not trying to be a bore, just want to write fast code with few indexes...

>It is not the same. field # '' will work only if SET EXACT is OFF. EMPTY returns .t. for character strings made only of spaces, too.
>
>Vlad
>
>>I noticed that field # '' is faster than empty(field), but it turns out that it was because I had a index on field.
>>
>>>Sylvain answered your question. I just want to add that
>>>
>>>empty(lcAVar)
>>>
>>>is faster than
>>>
>>>len(allt(lcAVar)) = 0
>>>
>>>It is also more clear.
>>>
>>>Vlad
>>>
>>>>What is wrong with my code??
>>>>
>>>>*** Variables:
>>>>mswhere1 = ''
>>>>mswhere2 = ''
>>>>director = "'Brady'"
>>>>
>>>>mswhere3 = iif(len(allt(director)) = 0,; mswhere2,iif(allt(len(mswhere2)) = 0, director,;
>>>> mswhere2 + ' and ' + director))
>>>>
>>>>*******
>>>>I got the error 'Function argument value, type, or count is invalid'
>>>>
>>>>Thanks a lot.
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform