cStringString to analyze.
AdvPL GuideIsDigit(cString) -> lResultChecks whether the first character is between 0 and 9.
Only the first character is examined. IsDigit("1A") is true even though the entire string is not a valid number. The official note mentions Val, but this does not make the function a complete validator for numeric format, signs, separators or decimals. (Sources: refs. 1–1.)
IsDigit(cString) -> lResultcStringString to analyze.
Logical result about the first character.
#Include "Protheus.ch"
User Function Ed495()
// Only the first character is checked.
ConOut(IsDigit("1A"))
ConOut(IsDigit("A1"))
Return NilResults: 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.