xExp1Comparable value of the same type as the other argument.
AdvPL GuideMax(xExp1,xExp2) -> xResultReturns the greater of two numbers or dates.
Arguments must be comparable and of the same type. The function chooses between two values; it does not scan an entire array. Numeric inputs keep this example independent of date settings. (Sources: refs. 1–1.)
Max(xExp1,xExp2) -> xResultxExp1Comparable value of the same type as the other argument.
xExp2Comparable value of the same type as the other argument.
Selected value preserving its type.
#Include "Protheus.ch"
User Function Ed524()
// Compare values of the same type.
ConOut(cValToChar(Max(10,12)))
Return NilResult: 12. 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.