>>>I know that, of course.
>>>
>>>But type('FieldName')<>'U' would not tell us whether we have a field 'fieldname' in the currently opened alias, if we have a variable with this name.
>>>
>>>That's the point I tried to make.
>>>
>>>In other words, the above test will only tell us that we may have either a variable or a field name called 'fieldname' while field() will remove ambiguity.
>>
>>If you expect conflict between a field name and memory variable, always use alias prefix.
>
>
>LOCAL lnSec, llCheck
>lnSec = SECONDS()
>FOR i = 1 TO 100000
> llCheck = not EMPTY(FIELD('kyWarrant'))
>NEXT
>=MESSAGEBOX(SECONDS() - lnSec)
>lnSec = SECONDS()
>FOR i = 1 TO 100000
> llCheck = type('kyWarrant')<>'U'
>NEXT
>=MESSAGEBOX(SECONDS() - lnSec)
>
>So field() will outperform type also.
Like I said! :) I have a more complete program to contrast speed of UDF using type, field and fsize which I'll post later. It certainly makes it clearer what's happening too.