bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bc on Uwin 2.9


From: Harald Anlauf
Subject: Re: bc on Uwin 2.9
Date: 15 Jun 2001 23:08:04 +0200

address@hidden (John Damiano) writes:

> While using the bc function it was noticed that it was
> unable to convert from decimal to base2 or base 16.
[...]
> What I did was enter bc, 
> ob=16
> ib=10
> 174   should be converted to hex on the return.
> 174 is displayed again.

obase=16 does the job for me.

RTFM:

   VARIABLES
[...]
       There are four special variables, scale, ibase, obase, and
       last.  scale defines how some operations use digits  after
       the decimal point.  The default value of scale is 0. ibase
       and obase define the conversion base for input and  output
       numbers.   The  default  for both input and output is base

-- 
Ciao,
-ha



reply via email to

[Prev in Thread] Current Thread [Next in Thread]