From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 05 Nov 2020 17:47:25 +0100 Subject: [PATCH 10/10] setexpr: Add support for strings In-Reply-To: References: <20201101211544.3579850-1-sjg@chromium.org> <20201101211544.3579850-11-sjg@chromium.org> <20201102000824.10fb538c@nic.cz> Message-ID: <394232.1604594845@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon, In message you wrote: > > > What is the purpose of + operator on strings? > > Can't we use setenv "${a}${b}" ? > > Yes, that does the same thing, although it is a bit clumsy. > > setenv a *10 > setenv b *100 > setenv c "${a}${b}" > > instead of > > setexpr c *10 + *100 I don't get it. The equivalent to "${a}${b}" would be setexpr c "*10*100" which is even simpler? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "You know, after a woman's raised a family and so on, she wants to start living her own life." "Whose life she's _been_ living, then?" - Terry Pratchett, _Witches Abroad_