From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31903 invoked from network); 23 Oct 2023 18:22:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Oct 2023 18:22:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1698085338; b=KptlQkhwxrM9lg5qASA93aPgFxwNRp7Dbrs5ifW1R8H6u/OHp4C2ky73cNhXMR3C6NqgTiH9el pfBtSoW/M5Y/t9Nxge4x1bptuYXsgclOa5qmTr2sh9g/7Ql+2EZZ6tw7BrEbYOiSGfTSPb2plD +3Zz5+Fh8hXdptKm1hsq9KeYRWac3gldZ8QOBCoHszkh6JLzCfa3ct67ghKFMysmHYp9cQeIdL LzkbxinWP+AJGBCvSm8FC6GLW03W+mD5wh47lmjg9bN5yiB71D2x7kn8sl2xS9zqeCshpMnsY2 KeCVhkREzQpzA9OoLgOdOgDDOSPCg41lP3o58hKruRjRyA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1698085338; bh=usbSDya0OqOnFTEWfbkC/QVxkZMM1hspPscjEAeCj+g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=TLLjwtvpfX0M4A7g5B6lXWxhierSncLS+hyesvbeADdyCORYRaXPGe0+OIWzbzR/D2ZB966B1v uHPxyFMBs9x5y7vJgjWNC28PWy3xCccawKrExkVJk35KRq+EomgLe2pyegFggX9sKtkGBd8ATJ YKNrdxpj4QLP+IKL9jorELnGjNDuG7TBEpa6HXXPMvZtysV/8rn2PH+h/c02atms3BeQ9sbq/e q41x15zx71O/H4Nv5Mm77UQ+FYPp6dPmC4FJOmt2gCTxMvJZvbr5Ql6AaC1YD9wumAQJuZ+/Zo Jjdj9lPk1SgPwLYrb4El9ddAlopeyBRpfQ5opSkrn1qWSg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=S1gkGCQJqG3cJjWwRpnAA0IcyEdv2hFWfjSwJ3mbIHA=; b=f01j22P36dMwanKaG7W5et9R5Q bB/6ik4pnjZOk+qbpD/AVl08YCnULZ4skHr2ZjFosEfgipUUolymT0Fpv6RYKBgSqQvWseGEBQss3 obD6sCusWpbnsFMGgQvY3xbEnfjmfIvsosXL4rm0attRHURsR1XoplQRXkOXeeo+CcPKO2yidP6jJ i8xFD19TbPo+toC5AB9H7qGvt7yqh/GKzqHZ9+jSknbEy6AmnmnJD2Vpn9Fny5XjAo34Yv0ICpiZF +5WMlYKbPBVZAcd0XFOAx5zgsycK/IQ/0Nm5CNApIyIQWDiNCEKMFPwt1VdSgcZxI2f49PRU2lX7M AUk+FqZg==; Received: by zero.zsh.org with local id 1quzZC-000PlH-Ba; Mon, 23 Oct 2023 18:22:18 +0000 Authentication-Results: zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none Received: from mta04.eastlink.ca ([24.224.136.10]:43339) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1quzYT-000P2o-D0; Mon, 23 Oct 2023 18:21:35 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0S2Z1W2TMUW7Z050@mta04.eastlink.ca> for zsh-users@zsh.org; Mon, 23 Oct 2023 15:21:32 -0300 (ADT) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id uzYRqPpy8LNFQuzYRqYryI (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Mon, 23 Oct 2023 15:21:32 -0300 X-Authority-Analysis: v=2.4 cv=f9GORs+M c=1 sm=1 tr=0 ts=6536b9ac a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=36k8OsV8iz2DjBwCPSUA:9 a=QEXdDO2ut3YA:10 a=ZXulRonScM0A:10 a=zZCYzV9kfG8A:10 a=pGLkceISAAAA:8 a=_W_S_7VecoQA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeeigdduvddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------qMOvqXcqHKNXjjKKWXMs3AEW" Message-id: <9b1ec75f-3f94-47a3-ad82-baafbeaa6174@eastlink.ca> Date: Mon, 23 Oct 2023 11:21:29 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Variable fails to increment with lvalue error Content-language: en-US To: zsh-users@zsh.org References: <1372623164.1448847.1698079437641@mail.virginmedia.com> From: Ray Andrews In-reply-to: X-Seq: 29317 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------qMOvqXcqHKNXjjKKWXMs3AEW Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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? ... --------------qMOvqXcqHKNXjjKKWXMs3AEW Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


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? ...

--------------qMOvqXcqHKNXjjKKWXMs3AEW--