See also: binToDec, hexToDec |
Converts an octal number string to a decimal.
JSV_octToDec(expO)
expO.octToDec()
The octToDec function returns the decimal number of the octal number string.
The octToDec function uses the following arguments.
Argument | Description |
expO | The octal number string that is to be converted to a decimal. |
There is no checking whether expO is a binary string. Users of this function should check that the value of expO is a valid argument to this function.
Uses the parseInt
function to return an integer representing the specified binary string.
If the first character cannot be converted to a number, parseInt
returns
NaN
.
n/a
The following lines of code
var f = "1554";
document.write( "The number " + f + " is decimal " + JSV_octToDec(f) );
f = "741";
document.write( "The number " + f + " is decimal " + JSV_octToDec(f) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.