Am 20 Jun 2006 um 9:39 hat Robert Dodier geschrieben:
> Volker,
>
> > (%i2) block( [ibase:16], a );
> > (%o2) a
> > (%i3) block( ibase:16, a );
> > (%o3) a
> > (%i4) a;
> > (%o4) 10
> >
> > An assignment to ibase in a block doesn't have any consequence inside the block itself.
> > Does it make sense then, if this only works in top level?
>
> That is to be expected. Maxima parses the entire input expression
> before evaluating it. So in block([ibase : 16], a) , a is read with the
> value of ibase *before* 16 is assigned.
Obviously!
But my question remains the same: Does this make sense, if we can't use a local defined
ibase in a function definition?
> > Maybe one could think about implementing bytestrings.
>
> Not sure what you mean here. Maybe you can expand on this point.
Sorry Robert, bytestrings are an interesting but different theme.
What I thought about was a string implementation like what Richard Fateman suggested
yesterday:
> I think that input of hexadecimal could be done by just adding a function.
> For example, read_from_string("ff00",16).
Volker