Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is correct ?
Message
De
31/12/2004 17:38:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00973168
Message ID:
00973589
Vues:
15
>>>
>>>The answer in the function description, "Converts a character expression, supplied by a user, into a form that can be compared with Visual FoxPro function return values". The VFP functions it refers to are KEY(), FILTER(), e.t.c.
>>
>>Hi Sergey,
>>sorry but i don't see the scope of this function ?
>>I do not understand what I can compare.
>>
>>You can found one minute for a simple example ?
>>Just a sketch.
>>
>Fabio,
>
>Let's say that you store metadata for your tables index tags in a table and you want to see if actual indexes in the tables matches your metatdata. You cannot do that directly because KEY() function returns key expression in "normalized" form and your metadata is stored on the form convinient for you. Check following example
CREATE CURSOR test (;
>	fld1 C(1), fld2 D, fld3 int)
>lcTagKey = [fld1 + DTOC(fld2,1)]
>INDEX ON &lcTagKey TAG f12
>? KEY(1)
>? UPPER(KEY(1)) = UPPER(lcTagKey)  && .F.
>? KEY(1) = NORMALIZE(lcTagKey)     && .T.
>
BTW, notice that DTOC() function has been replaced with DTOS.

Thanks, Sergey,
Your example is optimal.

I have realized this the past night
(strange, but the things that I do not understand in kind I understand them when I sleep);
before, I hoped of being able to use NORMALIZE() in order to control the syntax of an expression inserted from a my customer in a field expression;
but even if a function existed that check the syntax, to use it is mistaken,
TRY/EVAL()/CATCH within a context it is the solution.

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform