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