about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-02-04 20:46:49 -0800
committerBart Schaefer <schaefer@zsh.org>2024-02-04 20:46:49 -0800
commit791aaf88cca53036d19ad2e247c783744ccf3837 (patch)
treef1fca805eae0bde51fc2b70d4a3fac90f7dad07c /Doc
parent58ff6c68d5022c013d58caf1ee6d5c78dc7d67a8 (diff)
downloadzsh-791aaf88cca53036d19ad2e247c783744ccf3837.tar.gz
zsh-791aaf88cca53036d19ad2e247c783744ccf3837.tar.xz
zsh-791aaf88cca53036d19ad2e247c783744ccf3837.zip
cf. users/29635: additional detail of parameter expansion in math context.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/arith.yo5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/Zsh/arith.yo b/Doc/Zsh/arith.yo
index bc3e35ad5..9f5298821 100644
--- a/Doc/Zsh/arith.yo
+++ b/Doc/Zsh/arith.yo
@@ -206,6 +206,11 @@ example,
 example(((val2 = val1 * 2)))
 
 assigns twice the value of tt($val1) to the parameter named tt(val2).
+If the expansion of tt($val1) is text rather than a number, then when
+tt(val1) is referenced that text is itself evaluated as a math expression
+as if surrounded by parentheses `tt(LPAR()$val1)tt(RPAR())'.  Expansion
+continues until there are no more parameter references, a number has
+resulted, or an expression error occurs.
 
 An internal integer representation of a named parameter
 can be specified with the tt(integer) builtin.