home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
16
/
parens.prg
< prev
next >
Wrap
Text File
|
1992-03-16
|
511b
|
13 lines
******************************************************************
* FUNCTION parens
* This function will place parenthesis around a negative number
* No spaces will be displayed between the negative number
* and the parenthesis (as they are if the @( format code is used).
******************************************************************
FUNCTION parens
PARAMETER number, pic
RETURN IIF(number >= 0, ;
TRANSFORM(number, pic),;
PADL("("+ALLTRIM(TRANSFORM(ABS(number),pic))+")",LEN(pic)+1,' '))