number formats



On 5/7/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> Yes.  Exactly the same objections as last time: that it would be a bad idea
> to change the interpretation of strings like a (a symbol), 1b2 (a bfloat),
> and 2e3 (a float) when ibase changes.

Yes. So what? If I don't want to reinterpret some symbols as numbers,
I won't change ibase.

There are lots of global variables which can cause some code to fail.
simp:false would cause lots of things to break. Yet the continued
existence of the simp flag doesn't seem to cause trouble, and it's
actually useful sometimes.

> In regular, parsed, input, tokens starting with initial 0 are parsed as
> numbers, so in ibase=2^4:
> 0a = 10.
> 01b2 = 434.
> 02e3 = 739.

I'm not entirely opposed to this.

> That there be a separate "read" function (read_integer, say), which reads
> one integer in the current input base:
> (%i23) ibase: 2^4$
> (%i24) a-1;
> (%o24) a-1
> (%i25) read_integer("Number, please:")-1
> Number, please:
> a
> (%o25) 9

Another there's-someone-at-the-console function. Uh oh.

Robert