nNumber BIN2I(<cSignedInt>) nNumber BIN2L(<cSignedInt>) nNumber BIN2W(<cUnsignedInt>) <nValue> DSTRTON(<sString>) <nValue> FSTRTON(<sString>) cBitPattern FT_BYT2BIT( <cByte> ) cHexValue FT_BYT2HEX( cByte ) <cNumE> FT_D2E( <nDec>, <nPrecision> ) cBinaryNumber FT_DEC2BIN( <nNum> ) <nDec> FT_E2D( <cNumE> ) <cPrinterFormat> FT_ESCCODE( <cASCII> ) nDecNum FT_HEX2DEC( <cHexNum> ) cColor FT_INVCLR( [ <cDsrdColor> ] ) cWords FT_NTOW( <nNumber> ) cCompressed FT_SQZN( <nValue> [, <nSize> [, <nDecimals> ] ] ) nValue FT_UNSQZN( <cCompressed>, <nSize> [, <nDecimals> ] ) xResult FT_XTOY( <xValueToConvert>, <cTypeToConvertTo> ; [, <lWantYesNo> ] ) <sStr> HASHNAME(<nHashCode>) <nHashCode> HASHSTR(<sStr>) cBinaryInteger I2BIN(<nInteger>) cBinaryInteger L2BIN(<nExp>) <vData> STR2VAR(<sUucodeStr>) <sUucodeStr> VAR2STR(<vData>)
FT_BYT2BIT( <cByte> ) --> cBitPattern
Can be used to show results of bit manipulation, both before and after. Binary representation follows right-to-left convention of bit position numbering, 0 through 7. Space between high and low nibbles for clarity and easy comparison to hexadecimal notation.
This function is presented to illustrate that bit-wise operations are possible with Clipper code. For greater speed, write .C or .ASM versions and use the Clipper Extend system.
<cByte> | is the byte to convert. |
Returns : | 9-character string, consisting of 1's and 0's, representing bits 0 through 7 of parameter byte, with space between bits 3 and 4. Returns NIL if parameters are faulty. |
See also : | FT_BYT2HEX() |
FT_BYT2HEX( cByte ) --> cHexValue
Can be used to show results of bit manipulation, both before and after.
This function is presented to illustrate that bit-wise operations are possible with Clipper code. For greater speed, write .C or .ASM versions and use the Clipper Extend system.
<cByte> | is the byte to convert. |
Returns : | Three-character string, consisting of two digits of hexadecimal notation and letter 'h' to signify hex. Returns NIL if parameters are faulty. |
See also : | FT_BYT2BIT() |
FT_D2E( <nDec>, <nPrecision> ) --> <cNumE>
Given a decimal number and the desired precision, a string representing the equivalent in scientific notation is returned.
<nDec> | Decimal number to convert |
<nPrecision> | Number of decimal places in result. Defaults to 6 decimal places. |
Returns : | <cNumE> A string representing a number in scientific notation |
See also : | FT_E2D() |
FT_DEC2BIN( <nNum> ) --> cBinaryNumber
This function can be used in conjunction with any bit-wise operations.
FT_E2D( <cNumE> ) --> <nDec>
Given a string in the format x.yEz, the decimal equivalent is returned.
<cNumE> | Scientific notation string to convert |
Returns : | <nDec> Decimal number |
See also : | FT_D2E() |
FT_ESCCODE( <cASCII> ) --> <cPrinterFormat>
This function is useful for allowing the user to enter printer control codes in Lotus-style ASCII format, and then having this function convert that code to the format that the printer needs to receive.
FT_HEX2DEC( <cHexNum> ) --> nDecNum
Converts a hexadecimal number to a BASE 10 decimal number. Useful for using FT_INT86().
FT_INVCLR( [ <cDsrdColor> ] ) --> cColor
This function inverts a passed color (in the Clipper format: ??/??), e.g., "W/N" is converted to "N/W".
FT_NTOW( <nNumber> ) --> cWords
Translates numeric input to a text string.
FT_NTOW is intended to be used with integers only. Since I don't know what your application will be, I can't assume the type of fraction you want returned (ninety nine cents, 99/100, .99, etc). If you want the fraction in words, just pass it as an integer.
Do not pass a negative number! Handle negative numbers any way you need to in your code. (ie: CR, DB, Negative, Minus, etc.)
Also, numeric 0 is returned as a null string. You will need to make a decision how to output it (zero dollars, no dollars, etc).
FT_SQZN( <nValue> [, <nSize> [, <nDecimals> ] ] ) --> cCompressed
The FT_SQZN function allows a numeric value to be compressed when stored in the database. The compression is 50% the storage space of the original number. The companion function, FT_UNSQZN returns the original number from the compressed string.
Returns : | cCompressed - Compressed string, 50% the size of nSize |
See also : | FT_UNSQZN() |
FT_UNSQZN( <cCompressed>, <nSize> [, <nDecimals> ] ) --> nValue
The FT_UNSQZN function returns the numeric value from the compressed string. The compression is 50% the storage space of the original number. The original number must have been compressed using the FT_SQZN() function.
This function, along with FT_SQZN() can be used to reduce disk storage requirements for numeric fields in a database file.
<cCompressed> | - Compressed string, obtained from FT_SQZN() |
<nSize> | - Size of numeric field |
<nDecimals> | - Optional number of decimal places |
Returns : | nValue - Uncompressed numeric value |
See also : | FT_SQZN() |
FT_XTOY( <xValueToConvert>, <cTypeToConvertTo> ; [, <lWantYesNo> ] ) --> xResult
This function converts a value of character, date, numeric, logical, array or code block type to any of the other type. While it is guaranteed to return a value of the correct type, that value may not be meaningful (i.e., converting from a code block returns an EMPTY() value of the desired type).
<xValueToConvert> | is the value to convert. |
<cTypeToConvertTo> | is the type of value to convert to ("C","D","L","N","A" or "B"). |
<lWantYesNo> | is a logical to signal if 'Y' or 'N' is to be returned if Converting a logical, otherwise '.T.' or '.F.' will be returned for logicals. |
Returns : | The original value converted to the new type. |