summaryrefslogtreecommitdiff
path: root/doc/misc/calc.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/misc/calc.texi')
-rw-r--r--doc/misc/calc.texi44
1 files changed, 31 insertions, 13 deletions
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 5dabf5cd314..0bf7833ec34 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -9909,9 +9909,9 @@ listed.
@kindex h n
The @kbd{h n} or @kbd{h C-n} (@code{calc-view-news}) command displays
-the ``news'' or change history of Calc. This is kept in the file
-@file{README}, which Calc looks for in the same directory as the Calc
-source files.
+the ``news'' or change history of Emacs, and jumps to the most recent
+portion concerning Calc (if present). For older history, see the file
+@file{etc/CALC-NEWS} in the Emacs distribution.
@kindex h C-c
@kindex h C-d
@@ -14122,7 +14122,7 @@ conventions. Like C mode, Pascal mode interprets array brackets and uses
a different table of operators. Hexadecimal numbers are entered and
displayed with a preceding dollar sign. (Thus the regular meaning of
@kbd{$2} during algebraic entry does not work in Pascal mode, though
-@kbd{$} (and @kbd{$$}, etc.) not followed by digits works the same as
+@kbd{$} (and @kbd{$$}, etc.)@: not followed by digits works the same as
always.) No special provisions are made for other non-decimal numbers,
vectors, and so on, since there is no universally accepted standard way
of handling these in Pascal.
@@ -27866,11 +27866,6 @@ acres per meter-second.) Remainder units are expressed in terms of
``fundamental'' units like @samp{m} and @samp{s}, regardless of the
input units.
-If you want to disallow using inconsistent units, you can set the customizable variable
-@code{calc-ensure-consistent-units} to @code{t} (@pxref{Customizing Calc}). In this case,
-if you request units which are inconsistent with the original units, you will be warned about
-it and no conversion will occur.
-
One special exception is that if you specify a single unit name, and
a compatible unit appears somewhere in the units expression, then
that compatible unit will be converted to the new unit and the
@@ -27880,6 +27875,12 @@ change the @samp{s} to @samp{ms} to get @samp{9.8e-4 cm/ms^2}.
The ``remainder unit'' @samp{cm} is left alone rather than being
changed to the base unit @samp{m}.
+If you want to disallow using inconsistent units, you can set the
+customizable variable @code{calc-ensure-consistent-units} to @code{t}
+(@pxref{Customizing Calc}). In this case, if you request units which
+are inconsistent with the original units, you will be warned about it
+and no conversion will occur.
+
You can use explicit unit conversion instead of the @kbd{u s} command
to gain more control over the units of the result of an expression.
For example, given @samp{5 m + 23 mm}, you can type @kbd{u c m} or
@@ -27912,10 +27913,16 @@ Composite units are expanded as if by @kbd{a x}, so that
If the value on the stack does not contain any units, @kbd{u c} will
prompt first for the old units which this value should be considered
-to have, then for the new units. Assuming the old and new units you
-give are consistent with each other, the result also will not contain
-any units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}}
-converts the number 2 on the stack to 5.08.
+to have, then for the new units. (If the value on the stack can be
+simplified so that it doesn't contain any units, like @samp{ft/in} can
+be simplified to 12, then @kbd{u c} will still prompt for both old
+units and new units. You can ignore the prompt for old units with
+@key{RET}, or turn off the prompt by setting the customizable variable
+@code{calc-allow-units-as-numbers} to @code{nil};
+@pxref{Customizing Calc}.) Assuming the old and new units you give are
+consistent with each other, the result also will not contain any
+units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts
+the number 2 on the stack to 5.08.
@kindex u b
@pindex calc-base-units
@@ -35694,6 +35701,17 @@ have different dimensions. The default value of @code{calc-ensure-consistent-uni
is @code{nil}.
@end defvar
+@defvar calc-allow-units-as-numbers
+When converting units, the variable @code{calc-allow-units-as-numbers}
+determines whether or not values which can be simplified so that
+they don't contain units (such as @samp{ft/in} can be simplified to 12)
+can be regarded as not containing units. If
+@code{calc-allow-units-as-numbers} is non-@code{nil}, then @kbd{u c}
+will prompt for both old units and new units when converting an expression
+like @samp{ft/in}, otherwise @kbd{u c} will only prompt for the new units.
+The default value of @code{calc-allow-units-as-numbers} is @code{t}.
+@end defvar
+
@defvar calc-undo-length
The variable @code{calc-undo-length} determines the number of undo
steps that Calc will keep track of when @code{calc-quit} is called.