Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>zeroremove()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ZEROREMOVE()
 Removes 0-bits in a file block
------------------------------------------------------------------------------
 Syntax

     ZEROREMOVE(<idDataBlock>) --> cString

 Argument

     <idDataBlock>  Designates a character string in which a 0-bit has
     been inserted using ZEROINSERT().

 Returns

     ZEROREMOVE() returns the character string to the same condition it was
     in prior to ZEROINSERT().

 Description

     This function is the opposite of ZEROINSERT().  This means that the 0-
     bit that was inserted, according to the special CCITT rule, is now
     removed.  Removing the bit decreases the length of the block up to 20%.

 Example

     This example shows the construction of a typical data block:

     cFlag   :=  CHR(CTON("01111110", 2))          // According to
                                                   // CCITT
     cData   :=  "Also transmit ????!"
     CRC    :=  COM_CRC(cData)

     cBlock  := cData + SUBSTR(L2BIN(CRC), 1, 2)   // Add CRC to
                                                   // string
     cBlock  := ZEROINSERT(cBlock)
     cBlock  := cFlag + cBlock + cFlag

     * ... transmission of the data block:

     cData   := REMALL(cFlag, cBlock)              // Remove flag
     cData   := ZEROREMOVE(cData)
     *... and subsequently the important CRC checks, etc.


See Also: ZEROINSERT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson