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 5.2 . The Guide To CA-Clippe - <b>l2bin()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 L2BIN()
 Convert a CA-Clipper numeric value to a 32-bit binary integer
------------------------------------------------------------------------------
 Syntax

     L2BIN(<nExp>) --> cBinaryInteger

 Arguments

     <nExp> is the numeric value to convert.  Decimal digits are
     truncated.

 Returns

     L2BIN() returns a four-byte character string formatted as a 32-bit
     binary integer.

 Description

     L2BIN() is a low-level file function used with FWRITE() to write
     CA-Clipper numeric values to a binary file.  This function is like
     I2BIN() which formats a CA-Clipper numeric to a 16-bit binary value.

     L2BIN() is the inverse function of BIN2L().

 Examples

     .  This example creates a new binary file then writes a series of
        numbers to the files using L2BIN() to convert the numeric value to
        32-bit binary form:

        #include "Fileio.ch"
        //
        LOCAL nNumber, nHandle
        nHandle := FCREATE("MyFile", FC_NORMAL)
        FOR nNumber := 1 TO 100
           FWRITE(nHandle, L2BIN(nNumber) + CHR(0))
        NEXT
        FCLOSE(nHandle)

 Files:  Library is EXTEND.LIB, source file is SOURCE\SAMPLE\EXAMPLEA.ASM.

See Also: BIN2I() BIN2L() BIN2W() CHR() FWRITE() I2BIN()

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