
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>l_num2str()</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
L_NUM2STR()
Syntax: L_NUM2STR(<expN>)
Purpose: Converts an integer into a character string
representing the amount in English words.
Argument: <expN> is the integer numeric expression to convert to
a character string.
Returns: A character string.
Usage: L_NUM2STR() is useful any time a numeric amount needs
to be written out in words.
NUM2STR handles numbers between negative
999,999,999.999 and positive 999,999,999.999999.
L_NUM2STR will return a string prefixed by the word
"minus" for negative values.
Note that since L_NUM2STR assumes integer input it will
truncate all digits to the right of the decimal point.
If you intend to use this function for currency amounts
see L_TOMONEY().
Example: ans = L_NUM2STR(34)
? ans && Result: thirty four
ans = L_NUM2STR(34.03)
? ans && Result: thirty four
ans = L_NUM2STR(34985)
? ans && Result: thirty four thousand nine hundred
eighty five
ans = L_NUM2STR(-34985)
? ans && Result: minus thirty four thousand nine
hundred eighty five
Language: Clipper
See Also: L_TOMONEY()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson