From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 3419829D09 for ; Sun, 4 Feb 2024 21:58:28 +0100 (CET) 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:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-Id:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=tHhs23/Jt/tGG816yKOyTRsJthjObifb4f7ULh8hdDk=; b=YJrkWOScSBaGdq1r+KVlcPRQKj 7x3EapitXDZMo9BZDLjT4zTrIub3ORsIY9pv0Egb1t6tWfA0CoRq5p1DsJBlaajVcpqytfkTeliZR l2cqrGX6FuZPrlLyL/uyp9kYxsnbLI96CXEhDlarpMb86sUJJNC4WSoLPMazHgAg6buvYpevr2Gf3 zyir8zJ/2VA7bTRMDDLBeqJGBMavOg34myH2TX+BYzp+WAiq6twj9vo1FBQLBGxH0kpHl21uEjT0H caXxsQm8apvEJBPm614taK9VAe4FMjE1cqnRFn+cug7LRYPmBm34z789fG5QLJ3V/PWPdImN9bzM7 GyKIl2nw==; Received: by zero.zsh.org with local id 1rWjZL-0004OS-MG; Sun, 04 Feb 2024 20:58:27 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rWjYo-0003iD-Ne; Sun, 04 Feb 2024 20:57:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id CA49627C0061 for ; Sun, 4 Feb 2024 15:57:53 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Sun, 04 Feb 2024 15:57:53 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedukedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesth dtredtreerjeenucfhrhhomhepnfgrfihrvghntggvucggvghljoiiqhhuvgiiuceolhgr rhhrhihvseiishhhrdhorhhgqeenucggtffrrghtthgvrhhnpeeileevheefgffhffeihe dtieegvdfgkeffteejgfetledtiedviedvteeukeegkeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdomhgvshhmthhprghuth hhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedqudduledvjeefkeehqdhlrghr rhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 97D2331A0065; Sun, 4 Feb 2024 15:57:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 MIME-Version: 1.0 Message-Id: <0a8adf9c-003a-4c74-a33a-66e29439d53a@app.fastmail.com> In-Reply-To: <52b86cf0-d60a-438b-a32f-656c769fb672@eastlink.ca> References: <4c14e191-0605-4492-9f67-9a5b35ef132b@eastlink.ca> <4da0eeb4-4589-4c5d-9b89-a1a22209e18e@eastlink.ca> <7ccf5b82-a37d-47b5-a700-fb1096ab495c@eastlink.ca> <0875ffd7-e3a4-4ddc-9c4b-47e2c593ea4c@eastlink.ca> <52b86cf0-d60a-438b-a32f-656c769fb672@eastlink.ca> Date: Sun, 04 Feb 2024 15:56:57 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: zsh-users@zsh.org Subject: Re: for loop 'bad math expression' Content-Type: text/plain X-Seq: 29630 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: On Sun, Feb 4, 2024, at 11:08 AM, Ray Andrews wrote: > But in my previous post it would seem that 'abc' IS an integer because it increments like one, but even then typeset -p shows it as scalar. No. It "increments like one" because you ran "abc=1; let abc+=3", and the arguments to "let" are interpreted as arithmetic expressions. If you'd run "abc=1; abc+=3" you would have gotten string concatenation. > It starts as a string assigned to 'var' but it would seem it gets 'promoted' to an integer variable. What? When you ran "abc=1" *you* created that variable. And it's not "an integer variable"; it doesn't have the integer attribute. -- vq