[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson