* [Comm] [JT] bc and numbers conversion
@ 2006-05-10 11:10 Dmytro O. Redchuk
2006-05-10 11:22 ` Dmytro O. Redchuk
0 siblings, 1 reply; 4+ messages in thread
From: Dmytro O. Redchuk @ 2006-05-10 11:10 UTC (permalink / raw)
To: ALT Community
Добрый день.
Вот, играюсь:
$ cat tohex
ibase=10
obase=16
$ cat todec
ibase=16
obase=10
$ echo 255 | bc tohex
FF
$ echo FF | bc todec
FF
Кто виноват и что делать?-)
Просто интересно.
--
_,-=._ /|_/|
`-.} `=._,.-=-._., @ @._,
`._ _,-. ) _,.-'
` G.m-"^m`m' Dmytro O. Redchuk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] [JT] bc and numbers conversion
2006-05-10 11:10 [Comm] [JT] bc and numbers conversion Dmytro O. Redchuk
@ 2006-05-10 11:22 ` Dmytro O. Redchuk
2006-05-10 11:41 ` Alexey I. Froloff
0 siblings, 1 reply; 4+ messages in thread
From: Dmytro O. Redchuk @ 2006-05-10 11:22 UTC (permalink / raw)
To: ALT Community
On Wed, May 10, 2006 at 02:10:31PM +0300, Dmytro O. Redchuk wrote:
> $ cat todec
> ibase=16
> obase=10
[...]
> $ echo FF | bc todec
> FF
>
> Кто виноват и что делать?-)
Вопрос снимается :-)
Закомментировал obase=10 в файле todec -- "заработало" (с) Матроскин.
Непонятно, почему так, но и то хорошо :-)
>
>
> Просто интересно.
--
_,-=._ /|_/|
`-.} `=._,.-=-._., @ @._,
`._ _,-. ) _,.-'
` G.m-"^m`m' Dmytro O. Redchuk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] [JT] bc and numbers conversion
2006-05-10 11:22 ` Dmytro O. Redchuk
@ 2006-05-10 11:41 ` Alexey I. Froloff
2006-05-10 11:59 ` Dmytro O. Redchuk
0 siblings, 1 reply; 4+ messages in thread
From: Alexey I. Froloff @ 2006-05-10 11:41 UTC (permalink / raw)
To: ALT Linux Community
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
* Dmytro O. Redchuk <dor@> [060510 15:27]:
> Закомментировал obase=10 в файле todec -- "заработало" (с) Матроскин.
> Непонятно, почему так, но и то хорошо :-)
Потому что тот obase который после ibase - уже в ibase читается.
Лучше сначала obase выставлять, а потом ibase.
--
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
Inform-Mobil, Ltd. System Administrator
http://www.inform-mobil.ru/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] [JT] bc and numbers conversion
2006-05-10 11:41 ` Alexey I. Froloff
@ 2006-05-10 11:59 ` Dmytro O. Redchuk
0 siblings, 0 replies; 4+ messages in thread
From: Dmytro O. Redchuk @ 2006-05-10 11:59 UTC (permalink / raw)
To: ALT Linux Community
On Wed, May 10, 2006 at 03:41:40PM +0400, Alexey I. Froloff wrote:
> * Dmytro O. Redchuk <dor@> [060510 15:27]:
> > Закомментировал obase=10 в файле todec -- "заработало" (с) Матроскин.
>
> > Непонятно, почему так, но и то хорошо :-)
> Потому что тот obase который после ibase - уже в ibase читается.
Хотя пример с tohex работает и так.
> Лучше сначала obase выставлять, а потом ibase.
Угу -- похоже на то.
Ну да ладно :-)
>
> --
> Regards, Alexey I. Froloff
> AIF5-RIPN, AIF5-RIPE
--
_,-=._ /|_/|
`-.} `=._,.-=-._., @ @._,
`._ _,-. ) _,.-'
` G.m-"^m`m' Dmytro O. Redchuk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-10 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-10 11:10 [Comm] [JT] bc and numbers conversion Dmytro O. Redchuk
2006-05-10 11:22 ` Dmytro O. Redchuk
2006-05-10 11:41 ` Alexey I. Froloff
2006-05-10 11:59 ` Dmytro O. Redchuk
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git