function FormatPercent(num,decimalNum,bolLeadingZero,bolParens,bolCommas)
/**********************************************************************
IN:
NUM - the number to format
decimalNum - the number of decimal places to format the number to
bolLeadingZero - true / false - display a leading zero for
numbers between -1 and 1
bolParens - true / false - use parenthesis around negative numbers
bolCommas - put commas as number separators.
RETVAL:
The formatted number!
**********************************************************************/
{
var tmpStr = new String(FormatNumber(num*100,decimalNum,bolLeadingZero,bolParens,bolCommas));
if (tmpStr.indexOf(")") != -1) {
// We know we have a negative number, so place '%' inside of ')'
tmpStr = tmpStr.substring(0,tmpStr.length - 1) + "%)";
return tmpStr;
}
else
return tmpStr + "%"; // Return formatted string!
}
See also:
| file: /Techref/language/asp/js/formatPercent.htm, 1KB, , updated: 2003/4/15 13:44, local time: 2012/2/10 11:38,
38.107.179.234:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/language/asp/js/formatPercent.htm"> language asp js formatPercent</A> |
| Did you find what you needed? |
|
PIC 16 series Microcontroller Instruction Set Reference. And his Hobby Electronics web site at http://hobby_elec.piclist.com. |
|
Peter Todd has released source and sample projects for his artwork, including his 3d wireframe cube renderer for the PIC 18f6520 This includes examples of hardware developed with free software tools such as gEDA/gschem/PCB, SDCC, gputils and picp all on Linux. http://petertodd.ca/art/source-code/ |
.