Difference between revisions of "Documentation/How Tos/Calc: HEX2OCT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
Line 30: Line 30:
  
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|
* [[Documentation/How_Tos/Calc: BIN2DEC function|BIN2DEC]],
+
* [[Documentation/How_Tos/Calc: BIN2DEC function|BIN2DEC]]
* [[Documentation/How_Tos/Calc: BIN2HEX function|BIN2HEX]],
+
* [[Documentation/How_Tos/Calc: BIN2HEX function|BIN2HEX]]
* [[Documentation/How_Tos/Calc: BIN2OCT function|BIN2OCT]],
+
* [[Documentation/How_Tos/Calc: BIN2OCT function|BIN2OCT]]
* [[Documentation/How_Tos/Calc: DEC2BIN function|DEC2BIN]],
+
* [[Documentation/How_Tos/Calc: DEC2BIN function|DEC2BIN]]
* [[Documentation/How_Tos/Calc: DEC2HEX function|DEC2HEX]],
+
* [[Documentation/How_Tos/Calc: DEC2HEX function|DEC2HEX]]
* [[Documentation/How_Tos/Calc: DEC2OCT function|DEC2OCT]],
+
* [[Documentation/How_Tos/Calc: DEC2OCT function|DEC2OCT]]
* [[Documentation/How_Tos/Calc: HEX2BIN function|HEX2BIN]],* [[Documentation/How_Tos/Calc: HEX2DEC function|HEX2DEC]],
+
* [[Documentation/How_Tos/Calc: HEX2BIN function|HEX2BIN]]
* [[Documentation/How_Tos/Calc: OCT2BIN function|OCT2BIN]],
+
* [[Documentation/How_Tos/Calc: HEX2DEC function|HEX2DEC]]
* [[Documentation/How_Tos/Calc: OCT2DEC function|OCT2DEC]],
+
* [[Documentation/How_Tos/Calc: OCT2BIN function|OCT2BIN]]
 +
* [[Documentation/How_Tos/Calc: OCT2DEC function|OCT2DEC]]
 
* [[Documentation/How_Tos/Calc: OCT2HEX function|OCT2HEX]]
 
* [[Documentation/How_Tos/Calc: OCT2HEX function|OCT2HEX]]
 
+
* [[Documentation/How_Tos/Calc: Number Conversion functions|Number Conversion functions]]
* [[Documentation/How_Tos/Calc: Number Conversion functions|Number Conversion functions]]'''
+
 
+
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}

Revision as of 14:00, 25 February 2009


HEX2OCT

Converts a hexadecimal number to octal.

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

Syntax:

HEX2OCT(hexadecimalnumber; numdigits)

returns text representing an octal number, given hexadecimalnumber, which may be text, or a number (taken to be hexadecimal although it is not).
The octal number returned may have up to ten digits in twos complement representation; positive numbers are 0 to 3777777777 octal and negative numbers 7777777777 to 4000000000 (a range of -229 to 229-1 decimal).
hexadecimalnumber must therefore also lie in this range, and is given in twos complement form with up to ten digits.
numdigits is an optional number specifying the number of digits to return.

Example:

HEX2OCT("1D")

returns 35 as text.

HEX2OCT(10)

returns 20 as text. The number 10 is read as hexadecimal.

HEX2OCT("1D"; 3)

returns 035 as text. HEX2OCT adds a leading zero to make 3 digits.

HEX2OCT("FFFFFFFFFE")

returns 7777777776 as text (twos complement representation of decimal -2).

Template:Documentation/SeeAlso

Personal tools