usenum - format numeric value with an exponent
int usenum(s, type, generic, sign, pound,
char *s, fill;
fill, dollar, hasdot, dot)
int type, sign, pound, dollar, hasdot, dot;
union generic generic;
Usenum formats the numeric value given by type, generic
(see generic(inc)) and stores it in the null-terminated string
s according to the remaining arguments.
Usenum returns zero unless the value can not be formatted as
specified. The format is described in printu(io),
specifically, the formatting of numeric values with an exponent.
Sign is an enumerated value which indicates how the
sign of the value is to be formatted:
| || ||Sign|| ||Printu sign format|
|0||Sign format not specified|
|1||Leading + (plus)|
|2||Trailing - (minus)|
|3||Trailing + (plus)|
Pound is the maximum number of positions available for digits
including a leading sign and a $ (dollar), if specified,
but excluding a decimal point, if specified. Fill is the character
for padding on the left. If dollar is set, a $ (dollar) is to be
included. If hasdot is set, a decimal point is to be included and
dot is the position before which the decimal point is to be located.
The basic conversion is performed via docvt (see numcvt(io)).
This function supports printu and does not directly implement
any BASIC functions.
generic(inc), numcvt(io), printu(io)
Usenum returns one if there is not enough space to format
at least one digit, a sign and a $ (dollar),
if specified; nevertheless, a valid representation of the value
is produced albeit a longer representation than specified.
The Basmark QuickBASIC Programmerís Manual