cStringInput text.
AdvPL GuideFWTxt2Array(cString,[nSize],[lBreak]) -> aReturnSplits text into lines while respecting words.
cString contains text and nSize limits generated line length. lBreak controls original CRLF handling, but the official table inconsistently labels it Array of Record. To avoid relying on this editorial error, the example only uses text and width. (Sources: refs. 1–1.)
FWTxt2Array(cString,[nSize],[lBreak]) -> aReturncStringInput text.
nSizeMaximum width.
Character array.
#Include "Protheus.ch"
User Function Ed453()
Local aLines := FWTxt2Array("ALFA BETA GAMA",9)
Local nI
// Display each generated line.
For nI := 1 To Len(aLines)
ConOut(aLines[nI])
Next
Return NilDisplays lines resulting from word-aware splitting. 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.