Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This is correct ?
Message
From
31/12/2004 17:38:50
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00973168
Message ID:
00973589
Views:
16
>>>
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform