[PATCH 10/10] setexpr: Add support for strings

Simon Glass sjg at chromium.org
Thu Nov 5 18:27:28 CET 2020


Hi Wolfgang,

On Thu, 5 Nov 2020 at 09:47, Wolfgang Denk <wd at denx.de> wrote:
>
> Dear Simon,
>
> In message <CAPnjgZ3SXdKaKmYCw=Q0w-JGhghAPVhwHdtG5q2dNEMNiY60Xg at mail.gmail.com> 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?

I don't see how that works. The *10 thing in my example reads a string
out of address 10.

Regards,
Simon


More information about the U-Boot mailing list