9front - general discussion about 9front
 help / color / mirror / Atom feed
* pc(1) display functions
@ 2016-09-05  3:04 BurnZeZ
  2016-09-05  8:45 ` [9front] " Julius Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: BurnZeZ @ 2016-09-05  3:04 UTC (permalink / raw)
  To: 9front

Neat tool, but one thing is weird.

>           bin(n)                Display n in binary.
>           oct(n)                Display n in octal.
>           dec(n)                Display n in decimal.
>           hex(n)                Display n in hexadecimal.

Why not also something like,

// print base
pb(n, b)        Display n in base b.

I understand the existing functions are meant to be shorthand for
commonly used bases.  I'm just proposing a shorthand for displaying a
number in an arbitrarily specified base.  I'm aware that truly
arbitrary bases are not currently supported by mp(2), but at the same
time, it may be desirable to print a number in some previously
specified base (a variable).

Furthermore, this would then be compatible with truly arbitrary bases
if, in the future, mp(2) allows so.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] pc(1) display functions
  2016-09-05  3:04 pc(1) display functions BurnZeZ
@ 2016-09-05  8:45 ` Julius Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Julius Schmidt @ 2016-09-05  8:45 UTC (permalink / raw)
  To: 9front

> but at the same time, it may be desirable to print a number in some
> previously specified base (a variable).

Good point, I'll add it.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05  3:04 pc(1) display functions BurnZeZ
2016-09-05  8:45 ` [9front] " Julius Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).