xValorParameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.
AdvPL GuideLen( <xValor> )Returns the length of a string or the number of elements in an array.
Returns the length of a string or the number of elements in an array. This page was created from the historical training material and structured for quick reference, with practical notes and cautious use in current Protheus environments.
Len( <xValor> )xValorParameter used by the function. Check the Portuguese source page for the detailed original wording while this entry remains under review.
User Function ExLen()
Local cName := "Customer"
Local aItems := {"A", "B", "C"}
MsgInfo("Text: " + CValToChar(Len(cName)))
MsgInfo("Items: " + CValToChar(Len(aItems)))
ReturnLen(cName) returns the text length and Len(aItems) returns the number of array elements.
© 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.