[thelist] JScript v VBScript

Michael Galvin mpgalvin at eircom.net
Tue Jan 29 15:19:07 CST 2002


Right, Math.round is probably more technically correct, but it certainly
isn't the cause of the massive difference between the 2 results.  ;)

----- Original Message -----
From: "Scott Dexter" <sgd at ti3.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, January 29, 2002 9:15 PM
Subject: RE: [thelist] JScript v VBScript


| >
| > VBScript:
| > MthFullCredit=int((Prin*MonthRate)/(1-(1+MonthRate)^(-1*NumPay
| > ments))*100)/1
| > 00
| >
| > JScript:
| > MthFullCredit=Math.ceil((Prin*MonthRate)/(1-(1+MonthRate)^(-1*
| > NumPayments))*
| > 100)/100;
| >
|
| in VBScript, Int() rounds, so you don't always get the ceiling, like
| you're specifying in the jscript version....
|
| sgd
| --
| For unsubscribe and other options, including
| the Tip Harvester and archive of thelist go to:
| http://lists.evolt.org Workers of the Web, evolt !
|
|




More information about the thelist mailing list