nValueNumericRequired
Positive value in this subset.
AdvPL GuideLog(nValue) -> nResultCalculates the natural logarithm, base e.
Takes a numeric value. For finite real results this example requires strictly positive input. Absence of runtime errors is not mathematical-domain or precision validation. (Sources: refs. 1–1.)
Log(nValue) -> nResultnValuePositive value in this subset.
Numeric logarithm result.
#Include "Protheus.ch"
User Function Ed509()
Local nValue := 1
// Validate the domain before calling.
If nValue > 0
ConOut(cValToChar(Log(nValue)))
EndIf
Return NilResult: 0. 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.