See also: decToBin, decToHex |
Converts a decimal number (i.e., integer) to a octal number string.
JSV_decToOct(expD)
expD.decToOct()
The decToOct function returns the octal number string of the decimal number.
The decToOct function uses the following arguments.
Argument | Description |
expD | The decimal number that is to be converted to a octal number. |
There is no checking whether expD is a integer. Users of this function should also use the isInteger function to check that the value of expD is a valid argument to this function.
Uses the toString
method of the
Number
object to return a string representing the specified Number
object.
n/a
The following lines of code
var f = 43;
document.write( "The number " + f + " is octal " + JSV_decToOct(f) );
f = 54;
document.write( "The number " + f + " is octal " + JSV_decToOct(f) );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.