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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
Line 32: Line 32:
 
* [[Documentation/How_Tos/Calc:_TEXT_function|<div style="font-size: 120%;">Text]]
 
* [[Documentation/How_Tos/Calc:_TEXT_function|<div style="font-size: 120%;">Text]]
 
* [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]]
 
* [[Documentation/How_Tos/Calc:_TRIM_function|<div style="font-size: 120%;">Trim]]
 +
* [[Documentation/How_Tos/Calc:_UNICODE_function|<div style="font-size: 120%;">Unicode]]
 +
* [[Documentation/How_Tos/Calc:_UNICHAR_function|<div style="font-size: 120%;">Unichar]]
 
* [[Documentation/How_Tos/Calc:_UPPER_function|<div style="font-size: 120%;">Upper]]
 
* [[Documentation/How_Tos/Calc:_UPPER_function|<div style="font-size: 120%;">Upper]]
 
* [[Documentation/How_Tos/Calc:_VALUE_function|<div style="font-size: 120%;">Value]]
 
* [[Documentation/How_Tos/Calc:_VALUE_function|<div style="font-size: 120%;">Value]]

Revision as of 11:23, 29 January 2024


BASE

Returns a text representation of a number, in a specified base radix.

Syntax:

BASE(number; radix; minlength)

converts number (a positive integer) to text, with the base radix radix (an integer between 2 and 36), using characters 0-9 and A-Z.
minlength (optional) specifies the minimum number of characters returned; zeroes are added on the left if necessary.

Example:

BASE(17; 2)

returns 10001 as text (binary system).

BASE(17; 10)

returns 17 as text (decimal system).

BASE(255; 16; 4)

returns 00FF as text (hexadecimal system). Extra zeroes are added to give 4 characters.

ISTEXT(BASE(17; 10))

returns TRUE. Text is returned, not a number.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_BASE_function&oldid=259502"
Views
Personal tools
Navigation
Tools