Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Variable fails to increment with lvalue error




On 2023-10-23 10:03, Roman Perepelitsa wrote:
Let's ask the OP if this would've been helpful.

Evan, have you read this documentation page? It's available at 

Beeeutiful!  Only the learner can say if a doc was useful, so ask him :-)

My two cents would be:

Note further that it would be incorrect to replace tt(val) with tt($val) as the latter is affected by the built-in double quote substitution, so that the arithmetic evaluation does not see the name of the variable but rather it's expanded value.  Thus if $val = 0, the latter _expression_ would attempt: 0 = 2 + 1 ... which is obviously nonsense.

... maybe too much hand-holding there? ...



Messages sorted by: Reverse Date, Date, Thread, Author