FTOA: Converting a Number to Alphanumeric Format

How to:

The FTOA function converts a number up to 16 digits from numeric format to alphanumeric format. It retains the decimal positions of the number and right-justifies it with leading spaces. You can add edit options to a number converted by FTOA.

When using FTOA to convert a number containing decimals to a character string, you must specify an alphanumeric format large enough to accommodate both the integer and decimal portions of the number. For example, a D12.2 format will be converted to A14. If the output format is not large enough, decimals are truncated.


Top of page

x
Syntax: How to Convert a Number to Alphanumeric Format
FTOA(number, '(format)', output_format)

where:

number

Numeric F or D (single and double precision floating-point)

Is the number to be converted.

format

Alphanumeric

Is the format of the number to be converted.

Parentheses are required around the format.

output_format

Alphanumeric



Example: Converting From Numeric to Alphanumeric Format

FTOA converts GROSS from floating point double-precision to alphanumeric format.

FTOA(GROSS, '(D12.2)', 'A15')

For $1,815.00, the result is 1,815.00.

For $2,255.00, the result is 2,255.00.


iWay Software