Documentation/How Tos/Calc: DEC2OCT function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 09:10, 24 November 2009 by OOoWikiBot (Talk | contribs)

Jump to: navigation, search


DEC2OCT

Converts a decimal number to octal.

This function is only available if the Analysis AddIn is installed.

Syntax:

DEC2OCT(number; numdigits)

returns an octal number as text, given the decimal number, which must be between -229 and 229-1 inclusive, and may be text or a number.
The result is an octal number with up to ten digits in two's complement representation.
numdigits is an optional number specifying the number of digits to return.

Example:

DEC2OCT(19)

returns 23 as text.

DEC2OCT("19")

returns 23 as text. DEC2OCT will accept a decimal number given as text.

DEC2OCT(19; 3)

returns 023 as text. Leading zeroes are added to make 3 digits.

DEC2OCT(-2)

returns 7777777776 as text.

Template:Documentation/SeeAlso

Personal tools