nValueNumericRequired
Positive value in this subset.
AdvPL GuideLog10(nValue) -> nResultCalculates the base-10 logarithm.
The reference warns of undefined results for negative values and infinity for zero. Rounding can affect numerical exactness. This example uses 100 with explicit domain validation. (Sources: refs. 1–1.)
Log10(nValue) -> nResultnValuePositive value in this subset.
Numeric logarithm result.
#Include "Protheus.ch"
User Function Ed510()
Local nValue := 100
// Validate the domain before calling.
If nValue > 0
ConOut(cValToChar(Log10(nValue)))
EndIf
Return NilExpected result approximately 2. 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.