cStringBit string.
AdvPL GuideBitOn( <cString>, <nInitialBit>, <nCountBits>, <nStringSize> )Records the partial string-bit activation contract.
The BITON() page describes setting bits in a string through four arguments: string, initial bit, bit count and string size. This is not a numeric BitOn(nNumber,nBit) signature. The page does not clarify index base, return representation or invalid-bound behavior. This review therefore provides no expected binary result and does not recommend use for real permission fields or formats. The example isolates a diagnostic call on a fictional byte and records only the returned type, subject to testing. (TOTVS, n.d., ref. 1)
BitOn( <cString>, <nInitialBit>, <nCountBits>, <nStringSize> )cStringBit string.
nInitialBitInitial bit; base unspecified.
nCountBitsBit count.
nStringSizeString size.
Unspecified in the page; verify type and content in testing.
#Include "Protheus.ch"
User Function EdBiton()
Local cTest := Chr(0)
Local xReturn
// Isolated diagnostic; not a production format.
xReturn := BitOn(cTest, 1, 1, Len(cTest))
ConOut(ValType(xReturn))
Return NilReturn type to be verified; no binary value is assumed. 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.