xExpValue to test.
AdvPL GuideEmpty( xExp ) --> lRetTests emptiness according to value type.
Empty means more than Nil: zero and false are also empty. Empty or space-only strings and zero-length arrays return true; arrays with elements are not empty even when their items are. TOTVS distinguishes ASCII 32 spaces from tabs/newlines in Protheus versions. Do not replace missing-parameter checks with Empty when zero is valid. The public example uses strings; the adaptation also exposes numeric behavior. (TOTVS, n.d., ref. 1)
Empty( xExp ) --> lRetxExpValue to test.
Logical result under type-specific rules.
#Include "Protheus.ch"
User Function Ed361()
// Emptiness is not parameter absence.
ConOut(cValToChar(Empty(0)))
ConOut(cValToChar(Empty({""})))
Return NilExpected results: true and false. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.