On Wed, Jan 30, 2019 at 2:30 AM Schwarz, Konrad
<konrad.schw...@siemens.com> wrote:
>
> > -----Original Message-----
> > From: Gavin Howard <gavin.d.how...@gmail.com>
> > Sent: Monday, January 28, 2019 7:54 PM
> > To: austin-group-l@opengroup.org
> > Subject: Re: bc Suggestions
> >
> > On Thu, Jan 10, 2019 at 4:19 PM Gavin Howard <gavin.d.how...@gmail.com> 
> > wrote:
>
> > If users sometimes start bc to do number conversions, then what the Open 
> > Group could do is add an option that more than 1 bc already
> > has:
> > -e, which allows users to input expressions directly at the command line 
> > (see
> > https://github.com/gavinhoward/bc/blob/master/manuals/bc.1.ronn).
> > Then users could use the alias mechanism to create all sorts of
> > aliases:
> >
> > alias d2o='bc -e "ibase=A;obase=8"'
> > alias h2d='bc -e "ibase=16;obase=A"'
> > alias o2b='bc -e "ibase=8;obase=2"'
> > ..
>
> For this particular problem, note
>
> printf %o\\n ...
>
> or
>
> echo $((...))
>
> or (non-POSIX)
>
> gdb> p/x ...

Yes. Exactly. There are ways to accomplish users being able to quickly
convert numbers between bases.

So in summary, changing the spec to require stacks for the globals
would have enormous benefits and (as far as I can tell) one downside
that is easily worked around by users who desire the behavior.

I believe that this change could spawn new libraries for bc and start
raising its visibility among command-line tools.

Gavin Howard

Reply via email to