Olá Pessoal,
Apenas para deixar registrado:
Empty segundo o manual retorna .T. nas seguintes situações para variáveis dos tipos:
A - Array: Array with zero elements
C - Character: Null string and White space characters (CR/LF, Space(), Tabs)
D - Date: Null date (CTOD(""))
H - Hash: Hash with zero elements
L - Logical: False (.F.). The Logical variable when "Nil" is same False.
M - Memo: Same as character
N - Numeric: The value zeroNão tem efeito (No empty value) para os tipos:
B - Code block
O - Object
P - PointerUma variável lógica pode ter valor Nil ou lógico quando usado em parâmetros. Exemplo:
Function GeraDanfePDF( cFile, lExibePdf )
...
lExibePdf := If( lExibePdf = Nil, .T., lExibePdf ) // usei assim para funcionar
...