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

Simon Glass
2020-11-05T17:27:28Z

Hi Wolfgang,

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