>>Hey all
>>
>>Some time ago I think Fabio Lunardon demonstrated using fsize to check for the presence of a field. What thread was that? I can't find it though I looked.
>>
>>Considering the need to manage SET COMPATIBLE for a UDF to use FSIZE I can't see it being the fastest way.
>>
>>I have used a UDF based on TYPE() and it is faster than a UDF using FSIZE that also handles setting and resetting SET COMPATIBLE. I think I found FIELD() is faster.
>>
>>There is another consideration. Using a UDF can be slow, so using an idea that is in my FoxPro Advisor article:
http://advisor.com/doc/17440, the command that can detect a field with the fewest external dependencies could be directly injected into code. It seems the easiest and fastest is to use FIELD().
>>
>>Did FIELD() always accept the fieldname and alias?
>
>Perhaps you meant this one
Re: Structure unknown Thread #
1079709 Message #
1079928 I found he gave the same advice in another thread started by Michel F.
Yes, that could be it. The problem as I see it, is having to force set compatible before being able to use the function.
I'd code a UDF to handle these things and then use compiler directives to let it choose the best way for each version.