mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 16:40:24 +02:00
31940: zcalc -e uses arguments as input
This commit is contained in:
parent
f77a7a5b18
commit
12251d65ff
3 changed files with 37 additions and 10 deletions
|
@ -3155,7 +3155,7 @@ sect(Mathematical Functions)
|
|||
|
||||
startitem()
|
||||
findex(zcalc)
|
||||
item(tt(zcalc) [ var(expression) ... ])(
|
||||
item(tt(zcalc) [ tt(-ef) ] [ var(expression) ... ])(
|
||||
A reasonably powerful calculator based on zsh's arithmetic evaluation
|
||||
facility. The syntax is similar to that of formulae in most programming
|
||||
languages; see
|
||||
|
@ -3195,6 +3195,10 @@ The output base can be initialised by passing the option `tt(-#)var(base)',
|
|||
for example `tt(zcalc -#16)' (the `tt(#)' may have to be quoted, depending
|
||||
on the globbing options set).
|
||||
|
||||
If the option `tt(-e)' is set, the function runs non-interactively:
|
||||
the arguments are treated as expressions to be evaluated as if entered
|
||||
interactively line by line.
|
||||
|
||||
If the option `tt(-f)' is set, all numbers are treated as floating
|
||||
point, hence for example the expression `tt(3/4)' evaluates to 0.75
|
||||
rather than 0. Options must appear in separate words.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue