www.delorie.com/gnu/docs/calc/calc_363.html | search |
Buy the book! | |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The functions described here are responsible for parsing and formatting Calc numbers and formulas.
nil
.
nil
if the user presses Return with a blank line. If initial is
given, it is a string which the minibuffer will initially contain.
If prompt is given, it is the prompt string to use; the default
is "Algebraic:". If no-norm is t
, the formulas will
be returned exactly as parsed; otherwise, they will be passed through
calc-normalize
first.
To support the use of $ characters in the algebraic entry, use
let
to bind calc-dollar-values
to a list of the values
to be substituted for $, $$, and so on, and bind
calc-dollar-used
to 0. Upon return, calc-dollar-used
will have been changed to the highest number of consecutive $s
that actually appeared in the input.
calc-edit
command.
This is a simple format designed
mostly to guarantee the string is of a form that can be re-parsed by
read-expr
. Most formatting modes, such as digit grouping,
complex number format, and point character, are ignored to ensure the
result will be re-readable. The prec parameter is normally 0; if
you pass a large integer like 1000 instead, the expression will be
surrounded by parentheses unless it is a plain number or variable name.format-flat-expr
(with prec equal to 0),
except that newlines will be inserted to keep lines down to the
specified width, and vectors that look like matrices or rewrite
rules are written in a pseudo-matrix format. The calc-edit
command uses this when only one stack entry is being edited.
read-expr
, for example, because of digit
grouping. Multi-line objects like matrices produce strings that
contain newline characters to separate the lines. The w
parameter, if given, is the target window size for which to format
the expressions. If w is omitted, the width of the Calculator
window is used.math-compose-lang
property on the function's symbol,
whose value is a Lisp function that takes a and prec as
arguments and returns a composition. Here lang is a language
mode name, one of normal
, big
, c
, pascal
,
fortran
, tex
, eqn
, math
, or maple
.
In Big mode, Calc actually tries math-compose-big
first, then
tries math-compose-normal
. If this property does not exist,
or if the function returns nil
, the function is written in the
normal function-call notation for that language.
compose-expr
into
a string. Multi-line compositions convert to strings containing
newline characters. The target window size is given by w.
The format-value
function basically calls compose-expr
followed by composition-to-string
.
nil
.nil
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
webmaster donations bookstore | delorie software privacy |
Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |