BINTOC( ) Function

Converts a numeric value to a binary character representation.

BINTOC(nExpression [, eFlags])

Parameters

nExpression

Specifies the value to convert. For eFlags settings 1, 2 or 4, this value is an integer. Otherwise, the expression data type is based on the eFlags setting.

eFlags

Specifies the length in characters of the returned character string.

eFlags determines the value you can specify for nExpression. eFlags can either be numeric or character. The following table lists the permissible values for eFlags and the corresponding range of values for nExpression:

eFlags nExpression Range

1

–128 to 127

2

–32,768 to 32,767

4

–2,147,483,648 to 2,147,483,647

This is default setting.

8

The range of nExpression depends on its type. Only numeric, float, double, and currency data types are supported with this option. See Visual FoxPro Data and Field Types for the ranges of the numeric, float, double, and currency data types.

BINTOC( ) returns 8 bytes for this setting.

F

nExpression is interpreted as a Float Field Type and BINTOC( ) returns 4 bytes.

B

nExpression is interpreted as a Double Field Type and BINTOC( ) returns 8 bytes.

R

Reverses the resulting binary expression.

S

Prevents the sign bit of number from being toggled (BITXOR).

If this parameter is omitted, BINTOC( ) returns a character string composed of four characters.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic