Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF transmutation
Message
From
12/08/2015 06:18:21
 
 
To
12/08/2015 02:13:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01623094
Message ID:
01623172
Views:
59
BTW

>>>>
>>>>*-- MYSEEK
>>>>LPARAMETERS tcValue, tcAlias, tcTag, tcReturnField
>>>>
>>>>IF SEEK( tcValue, tcAlias, tcTag )
>>>>   RETURN EVALUATE(tcReturnField)
>>>>ELSE
>>>>   pcFieldType = TYPE(tcReturnField)
>>>>   RETURN ICASE( pcFieldType = "L", .F. ;
>>>>      , pcFieldType = "T", {//::} ;
>>>>      , pcFieldType = "D", {} ;
>>>>      , pcFieldType $ "NIFB", 0 ;
>>>>      , pcFieldType = "Y", CAST(0, Currency) ;
>>>>      , "" )
>>>>ENDIF
>>>>
return eval ( 
                       iif (SEEK( tcValue, tcAlias, tcTag )  ;
                          , tcReturnField;
                          , "CAST('  ' as " + vartype(tcReturnField) +")" ;
                       )
will give you at least constant running time ;-))
(On the assumption you meant TYPE("tcReturnField") )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform