From 774b852c14a4a8df49c9ad35e609d8060b9b46a1 Mon Sep 17 00:00:00 2001 From: Rafael Lima Date: Sat, 8 May 2021 15:56:59 +0200 Subject: tdf#141929 Improve CONVERT help and move to a separate file Updates the content of the CONVERT help page to better match the description in the wiki, focusing in unit measurement and prefix tables. Also moves the CONVERT help page to a separate file and removes it from the original location 04060116.xhp. Change-Id: I591ce3d2cd36e224daf5d00593418cba7832e574 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/115209 Tested-by: Jenkins Reviewed-by: Steve Fanning Reviewed-by: Olivier Hallot --- AllLangHelp_scalc.mk | 1 + source/text/scalc/01/04060116.xhp | 332 +------ source/text/scalc/01/ful_func.xhp | 68 +- source/text/scalc/01/func_convert.xhp | 1741 +++++++++++++++++++++++++++++++++ 4 files changed, 1792 insertions(+), 350 deletions(-) create mode 100644 source/text/scalc/01/func_convert.xhp diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk index 0535a0ca29..3cca39631c 100644 --- a/AllLangHelp_scalc.mk +++ b/AllLangHelp_scalc.mk @@ -196,6 +196,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\ helpcontent2/source/text/scalc/01/func_countifs \ helpcontent2/source/text/scalc/01/func_color \ helpcontent2/source/text/scalc/01/func_concat \ + helpcontent2/source/text/scalc/01/func_convert \ helpcontent2/source/text/scalc/01/func_date \ helpcontent2/source/text/scalc/01/func_datedif \ helpcontent2/source/text/scalc/01/func_datevalue \ diff --git a/source/text/scalc/01/04060116.xhp b/source/text/scalc/01/04060116.xhp index 9d554aa81e..06141e1819 100644 --- a/source/text/scalc/01/04060116.xhp +++ b/source/text/scalc/01/04060116.xhp @@ -383,329 +383,17 @@ =OCT2HEX(144;4) returns 0064. -
-CONVERT function - - -

CONVERT

- Converts a value from one unit of measure to the corresponding value in another unit of measure. Enter the units of measures directly as text in quotation marks or as a reference. If you enter the units of measure in cells, they must correspond exactly with the following list which is case sensitive: For example, in order to enter a lower case l (for liter) in a cell, enter the apostrophe ' immediately followed by l. - - - - Property - - - Units - - - - - Weight - - - g, sg, lbm, u, ozm, stone, ton, grain, pweight, hweight, shweight, brton - - - - - Length - - - m, mi, Nmi, in, ft, yd, ang, Pica, ell, parsec, lightyear, survey_mi - - - - - Time - - - yr, day, hr, mn, sec, s - - - - - Pressure - - - Pa, atm, at, mmHg, Torr, psi - - - - - Force - - - N, dyn, dy, lbf, pond - - - - - Energy - - - J, e, c, cal, eV, ev, HPh, Wh, wh, flb, BTU, btu - - - - - Power - - - W, w, HP, PS - - - - - Field strength - - - T, ga - - - - - Temperature - - - C, F, K, kel, Reau, Rank - - - - - Volume - - - l, L, lt, tsp, tbs, oz, cup, pt, us_pt, qt, gal, m3, mi3, Nmi3, in3, ft3, yd3, ang3, Pica3, barrel, bushel, regton, Schooner, Middy, Glass - - - - - Area - - - m2, mi2, Nmi2, in2, ft2, yd2, ang2, Pica2, Morgen, ar, acre, ha - - - - - Speed - - - m/s, m/sec, m/h, mph, kn, admkn - - - - - Information - - - bit, byte - - -
- Units of measure in bold can be preceded by a prefix character from the following list: - - - - Prefix - - - Multiplier - - - - - Y (yotta) - - - 10^24 - - - - - Z (zetta) - - - 10^21 - - - - - E (exa) - - - 10^18 - - - - - P (peta) - - - 10^15 - - - - - T (tera) - - - 10^12 - - - - - G (giga) - - - 10^9 - - - - - M (mega) - - - 10^6 - - - - - k (kilo) - - - 10^3 - - - - - h (hecto) - - - 10^2 - - - - - e (deca) - - - 10^1 - - - - - d (deci) - - - 10^-1 - - - - - c (centi) - - - 10^-2 - - - - - m (milli) - - - 10^-3 - - - - - u (micro) - - - 10^-6 - - - - - n (nano) - - - 10^-9 - - - - - p (pico) - - - 10^-12 - - - - - f (femto) - - - 10^-15 - - - - - a (atto) - - - 10^-18 - - - - - z (zepto) - - - 10^-21 - - - - - y (yocto) - - - 10^-24 - - -
- Information units "bit" and "byte" may also be prefixed by one of the following IEC 60027-2 / IEEE 1541 prefixes: - - - - ki kibi 1024 - Mi mebi 1048576 - Gi gibi 1073741824 - Ti tebi 1099511627776 - Pi pebi 1125899906842620 - Ei exbi 1152921504606850000 - Zi zebi 1180591620717410000000 - Yi yobi 1208925819614630000000000 - - -
- - - CONVERT(Number; "FromUnit"; "ToUnit") - - Number is the number to be converted. - - FromUnit is the unit from which conversion is taking place. - - ToUnit is the unit to which conversion is taking place. Both units must be of the same type. - - - =CONVERT(10;"HP";"PS") returns, rounded to two decimal places, 10.14. 10 HP equal 10.14 PS. - - =CONVERT(10;"km";"mi") returns, rounded to two decimal places, 6.21. 10 kilometers equal 6.21 miles. The k is the permitted prefix character for the factor 10^3. -
-
+
+

+ +

+ + + +
+ +
FACTDOUBLE function factorials;numbers with increments of two mw added one entry diff --git a/source/text/scalc/01/ful_func.xhp b/source/text/scalc/01/ful_func.xhp index 8124719722..1a1f2a3a59 100644 --- a/source/text/scalc/01/ful_func.xhp +++ b/source/text/scalc/01/ful_func.xhp @@ -14,37 +14,49 @@ - Title in descriptions of functions -
-

Syntax

-
-
-

Examples

-
+ Title in descriptions of functions +
+

Syntax

+
+
+

Examples

+
+
+

Returns

+
- Notes for functions - - A complex number is a string expression resulting in the form "a+bi" or "a+bj", where a and b are numbers. - - - If the complex number is actually a real number (b=0), then it can be either a string expression or a number value. - + Yes or No paragraphs to be used in description tables +
+ Yes +
+
+ No +
- Warnings for functions - - The function always returns a string representing a complex number. - - - If the result is a complex number with one of its parts (a or b) equal to zero, that part is not displayed. - + Notes for functions + + A complex number is a string expression resulting in the form "a+bi" or "a+bj", where a and b are numbers. + + + If the complex number is actually a real number (b=0), then it can be either a string expression or a number value. + + + Warnings for functions + + The function always returns a string representing a complex number. + + + If the result is a complex number with one of its parts (a or b) equal to zero, that part is not displayed. + + + Other paragraphs + + The imaginary part is equal to zero, so it is not displayed in the result. + +
+ The result is presented in the string format and has the character "i" or "j" as an imaginary unit. +
- Other paragraphs - - The imaginary part is equal to zero, so it is not displayed in the result. - -
- The result is presented in the string format and has the character "i" or "j" as an imaginary unit. -
255 arguments String 1 [; String 2 [; … [; String 255]]]
diff --git a/source/text/scalc/01/func_convert.xhp b/source/text/scalc/01/func_convert.xhp new file mode 100644 index 0000000000..b64adbc994 --- /dev/null +++ b/source/text/scalc/01/func_convert.xhp @@ -0,0 +1,1741 @@ + + + + + + CONVERT function + /text/scalc/01/func_convert.xhp + + + +
+ + + CONVERT function + +

+ + CONVERT + function +

+ + Converts a value from one unit of measurement to the corresponding value in another unit of measurement. Enter the units of measurement directly as text in quotation marks or as a reference. The units of measurement specified through the arguments must match the supported unit symbols, which are case-sensitive. For example, the symbol for the unit "newton" is the uppercase "N". + The measurement units recognized by CONVERT fall into 13 groups, which are listed below. CONVERT will perform conversions between any two units within one group but reject any request to convert between units in different groups. + You can also add binary and decimal prefixes to units of measurement that support them. The list of all prefixes and their corresponding multipliers are shown below. +
+ This function may not be compatible with other spreadsheet software. + + + + CONVERT(Number; FromUnit; ToUnit) + + + Number is the number to be converted. + + + FromUnit is the unit from which conversion is taking place. + + + ToUnit is the unit to which conversion is taking place. Both units must be of the same type. + + If FromUnit and ToUnit are not valid units from the same group, then CONVERT reports an invalid argument error (Err:502). + + + + =CONVERT(-10; "C"; "F") + Here the function converts -10 degrees Celsius to degrees Fahrenheit, returning the value 14. There is not a simple multiplicative relationship bewteen temperature units, as different reference points are used. Hence, as in this case, an input negative number may be converted to a positive value. + + =CONVERT(3.5; "mi"; "yd") + Here the function converts 3.5 international miles to yards, returning the value 6160. Both units are in the Length and distance group. + + =CONVERT(256; "Gibit"; "Mibyte") + Here the function converts 256 gigibits to mebibytes, returning the value 32768. Both units (bit and byte) are in the Information group and support binary prefixes. + + =CONVERT(1; "dyn"; "e") + Here the function returns an invalid argument error (Err:502) because the two units (dyne and erg) are in different groups (Force and Energy respectively). + +
+

Units of measurement

+
+ Below are the unit measurement groups supported by the CONVERT function. Beware that conversions can only happen between units that belong to the same group. + The column Prefix indicates whether or not a given unit of measurement supports prefixes. + +

Area

+ Some measurement units have more than one accepted symbol. The accepted unit symbols are separated by semicolons in the Unit symbol column. + + + + Unit symbol + + + Description + + + Prefix + + + + + "ang2" ; "ang^2" + + + Square angstrom + + + + + + + + "ar" + + + Are + + + + + + + + "ft2" ; "ft^2" + + + Square foot + + + + + + + + "ha" + + + Hectare + + + + + + + + "in2" ; "in^2" + + + Square inch + + + + + + + + "ly2" ; "ly^2" + + + Square light-year + + + + + + + + "m2" ; "m^2" + + + Square meter + + + + + + + + "mi2" ; "mi^2" + + + Square international mile + + + + + + + + "Morgen" + + + Morgen + + + + + + + + "Nmi2" ; "Nmi^2" + + + Square nautical mile + + + + + + + + "Pica2" ; "Pica^2" ; "picapt2" ; "picapt^2" + + + Square pica point + + + + + + + + "pica2" ; "pica^2" + + + Square pica + + + + + + + + "uk_acre" ; "acre" + + + International acre + + + + + + + + "us_acre" + + + US survey acre + + + + + + + + "yd2" ; "yd^2" + + + Square yard + + + + + +
+ +

Energy

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "BTU" ; "btu" + + + British thermal unit + + + + + + + + "c" + + + Thermochemical calorie + + + + + + + + "cal" + + + International Steam Table calorie + + + + + + + + "e" + + + erg + + + + + + + + "eV" ; "ev" + + + Electron volt + + + + + + + + "flb" + + + Foot-pound + + + + + + + + "HPh" ; "hh" + + + Horsepower-hour + + + + + + + + "J" + + + Joule + + + + + + + + "Wh" ; "wh" + + + Watt-hour + + + + + +
+ +

Flux density

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "ga" + + + Gauss + + + + + + + + "T" + + + Tesla + + + + + +
+ +

Force

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "dyn" ; "dy" + + + Dyne + + + + + + + + "N" + + + Newton + + + + + + + + "lbf" + + + Pound-force + + + + + + + + "pond" + + + Pond + + + + + +
+ +

Information

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "bit" + + + Bit + + + + + + + + "byte" + + + Byte + + + + + +
+ +

Length and distance

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "ang" + + + Angstrom + + + + + + + + "ell" + + + Ell + + + + + + + + "ft" + + + Foot + + + + + + + + "in" + + + Inch + + + + + + + + "ly" ; "lightyear" + + + Light-year + + + + + + + + "m" + + + Meter + + + + + + + + "mi" + + + International mile + + + + + + + + "Nmi" + + + Nautical mile + + + + + + + + "parsec" ; "pc" + + + Parsec + + + + + + + + "Pica" ; "picapt" + + + Pica point + + + + + + + + "pica" + + + Pica + + + + + + + + "survey_mi" + + + US survey mile + + + + + + + + "yd" + + + Yard + + + + + +
+ +

Mass and weight

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "cwt" ; "shweight" + + + Short hundredweight + + + + + + + + "g" + + + Gram + + + + + + + + "grain" + + + Grain + + + + + + + + "lbm" + + + Pound + + + + + + + + "ozm" + + + Ounce + + + + + + + + "pweight" + + + Pennyweight + + + + + + + + "sg" + + + Slug + + + + + + + + "stone" + + + Stone + + + + + + + + "ton" + + + Short ton + + + + + + + + "u" + + + Unified atomic mass unit + + + + + + + + "uk_cwt" ; "lcwt" ; "hweight" + + + Long hundredweight + + + + + + + + "uk_ton" ; "LTON" ; "brton" + + + Long ton + + + + + +
+ +

Power

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "HP" ; "h" + + + Mechanical horsepower + + + + + + + + "PS" + + + Pferdestärke or metric horsepower + + + + + + + + "W" ; "w" + + + Watt + + + + + +
+ +

Pressure

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "atm" ; "at" + + + Standard atmosphere + + + + + + + + "mmHg" + + + Millimeter of mercury + + + + + + + + "Pa" + + + Pascal + + + + + + + + "psi" + + + Pound per square inch + + + + + + + + "Torr" + + + Torr + + + + + +
+ +

Speed

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "admkn" + + + Admiralty knot + + + + + + + + "kn" + + + International knot + + + + + + + + "m/h" ; "m/hr" + + + Meters per hour + + + + + + + + "m/s" ; "m/sec" + + + Meters per second + + + + + + + + "mph" + + + Miles per hour + + + + + +
+ +

Temperature

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "C" ; "cel" + + + Degree Celsius + + + + + + + + "F" ; "fah" + + + Degree Fahrenheit + + + + + + + + "K" ; "kel" + + + Kelvin + + + + + + + + "Rank" + + + Degree Rankine + + + + + + + + "Reau" + + + Degree Réaumur + + + + + +
+ +

Time

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "day" ; "d" + + + Day + + + + + + + + "hr" + + + Hour + + + + + + + + "mn" ; "min" + + + Minute + + + + + + + + "sec" ; "s" + + + Second + + + + + + + + "yr" + + + Year + + + + + +
+ +

Volume

+ + + + Unit symbol + + + Description + + + Prefix + + + + + "ang3" ; "ang^3" + + + Cubic angstrom + + + + + + + + "barrel" + + + Oil barrel + + + + + + + + "bushel" + + + US bushel + + + + + + + + "cup" + + + US cup + + + + + + + + "ft3" ; "ft^3" + + + Cubic foot + + + + + + + + "gal" + + + US gallon + + + + + + + + "Glass" + + + Australian glass (200 milliliters) + + + + + + + + "GRT" ; "regton" + + + Gross register tonnage + + + + + + + + "Humpen" + + + Humpen (500 milliliters) + + + + + + + + "in3" ; "in^3" + + + Cubic inch + + + + + + + + "l" ; "L" ; "lt" + + + Liter + + + + + + + + "ly3" ; "ly^3" + + + Cubic light-year + + + + + + + + "m3" ; "m^3" + + + Cubic meter + + + + + + + + "mi3" ; "mi^3" + + + Cubic international mile + + + + + + + + "Middy" + + + Australian middy (285 milliliters) + + + + + + + + "MTON" + + + Measurement ton + + + + + + + + "Nmi3" ; "Nmi^3" + + + Cubic nautical mile + + + + + + + + "oz" + + + US fluid ounce + + + + + + + + "Pica3" ; "Pica^3" ; "picapt3" ; "picapt^3" + + + Cubic pica point + + + + + + + + "pica3" ; "pica^3" + + + Cubic pica + + + + + + + + "pt" ; "us_pt" + + + US pint + + + + + + + + "qt" + + + US quart + + + + + + + + "Schooner" + + + Australian schooner (425 milliliters) + + + + + + + + "Sixpack" + + + Six pack (2 liters) + + + + + + + + "tbs" + + + US tablespoon + + + + + + + + "tsp" + + + US teaspoon + + + + + + + + "tspm" + + + Metric teaspoon + + + + + + + + "uk_gal" + + + Imperial gallon + + + + + + + + "uk_pt" + + + Imperial pint + + + + + + + + "uk_qt" + + + Imperial quart + + + + + + + + "yd3" ; "yd^3" + + + Cubic yard + + + + + +
+ +
+

Prefixes

+
+

Decimal prefixes

+ + + + Prefix + + + Multiplier + + + + + Y (yotta) + + + 1024 + + + + + Z (zetta) + + + 1021 + + + + + E (exa) + + + 1018 + + + + + P (peta) + + + 1015 + + + + + T (tera) + + + 1012 + + + + + G (giga) + + + 109 + + + + + M (mega) + + + 106 + + + + + k (kilo) + + + 103 + + + + + h (hecto) + + + 102 + + + + + e (deca) + + + 101 + + + + + d (deci) + + + 10-1 + + + + + c (centi) + + + 10-2 + + + + + m (milli) + + + 10-3 + + + + + u (micro) + + + 10-6 + + + + + n (nano) + + + 10-9 + + + + + p (pico) + + + 10-12 + + + + + f (femto) + + + 10-15 + + + + + a (atto) + + + 10-18 + + + + + z (zepto) + + + 10-21 + + + + + y (yocto) + + + 10-24 + + +
+ +

Binary prefixes

+ + + + Prefix + + + Multiplier + + + + + Yi (yobi) + + + 280 + + + + + Zi (zebi) + + + 270 + + + + + Ei (exbi) + + + 260 + + + + + Pi (pebi) + + + 250 + + + + + Ti (tebi) + + + 240 + + + + + Gi (gibi) + + + 230 + + + + + Mi (mebi) + + + 220 + + + + + ki (kibi) + + + 210 + + +
+ +
+ CONVERT Wiki page +
+ +
-- cgit