bBlocoBlock to execute.
AdvPL GuideEval( bBloco, [xVariavel] ) --> xRetornoExecutes a block and returns its last expression.
Eval executes the supplied block rather than merely inspecting it. Its return can be any type, depending on the last evaluated expression. Arguments are passed under the call contract. The example uses a pure calculation block and fixed input without macro-compiling external text or accessing tables. Check effects before evaluating interface or database callbacks. (TOTVS, n.d., ref. 1)
Eval( bBloco, [xVariavel] ) --> xRetornobBlocoBlock to execute.
xVariavelArgument supplied to the block.
Value of the block’s last expression.
#Include "Protheus.ch"
User Function Ed370()
Local bDouble := {|nValue| nValue * 2}
// Local calculation only, without external effects.
ConOut(cValToChar(Eval(bDouble, 4)))
Return NilExpected result: 8. 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.