All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Wolfgang Denk <wd@denx.de>
Cc: "Simon Glass" <sjg@chromium.org>,
	"Sean Anderson" <sean.anderson@seco.com>,
	roland.gaudig-oss@weidmueller.com,
	"U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Roland Gaudig" <roland.gaudig@weidmueller.com>,
	"Marek Behún" <marek.behun@nic.cz>
Subject: Re: [PATCH v1 1/1] cmd: setexpr: add dec operation for converting variable to decimal
Date: Fri, 25 Jun 2021 08:57:46 -0400	[thread overview]
Message-ID: <20210625125746.GP9516@bill-the-cat> (raw)
In-Reply-To: <223298.1624428530@gemini.denx.de>

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

On Wed, Jun 23, 2021 at 08:08:50AM +0200, Wolfgang Denk wrote:
> Dear Simon,
> 
> In message <CAPnjgZ13=2SCsZC1Y+m-HZOiBhpGiEFe2dRWwK9sAZHutgaO7Q@mail.gmail.com> you wrote:
> >
> > >  > 0m123 ? ('m' for deciMal).
> > >
> > > Perhaps 0d123? Though I would prefer to remove many of the implicit
> > > assumptions of hex input.
> >
> > Right, we can't use 'd' because it is valid hex.
> >
> > I believe hex is the right default. We just need an easy way to use decimal.
> 
> Maybe we should make this more general and support an even wirder
> range of formats?  Instead of just converting to decimal, we could
> pass a format string for sprintf() ?
> 
> Like:
> 
> 	# setexpr foo fmt %d $value

I like this idea as well.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2021-06-25 12:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 13:50 [PATCH v1 0/1] cmd: setexpr: add dec operation for converting variable to decimal roland.gaudig-oss
2021-06-22 13:50 ` [PATCH v1 1/1] " roland.gaudig-oss
2021-06-22 19:25   ` Simon Glass
2021-06-22 19:30     ` Sean Anderson
2021-06-23  0:09       ` Simon Glass
2021-06-23  6:08         ` Wolfgang Denk
2021-06-25 12:57           ` Tom Rini [this message]
2021-06-23  6:03   ` Wolfgang Denk
2021-06-23  8:20 Roland Gaudig (OSS)
2021-06-23  8:53 Roland Gaudig (OSS)
2021-06-23  9:43 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210625125746.GP9516@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=marek.behun@nic.cz \
    --cc=roland.gaudig-oss@weidmueller.com \
    --cc=roland.gaudig@weidmueller.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.