Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Octal and Hex Conversions

0 views
Skip to first unread message

Matt Diephouse

unread,
Jul 24, 2005, 12:37:37 AM7/24/05
to Perl 6 Internals
I don't see any opcodes currently for transforming octal and
hexadecimal strings to their integer equivalents. Should there be?

This seems like a common language feature (at least for Parrot's
target languages). And if there's no opcode, then I have to write the
code in PIR. :-)

Thanks.

--
matt diephouse
http://matt.diephouse.com

Leopold Toetsch

unread,
Jul 24, 2005, 7:22:45 AM7/24/05
to ma...@diephouse.com, Perl 6 Internals

On Jul 24, 2005, at 6:37, Matt Diephouse wrote:

>
> I don't see any opcodes currently for transforming octal and
> hexadecimal strings to their integer equivalents. Should there be?

Yes. Maybe:

set Ix, Sy, Ibase # Ibase = 2..36

> This seems like a common language feature (at least for Parrot's
> target languages). And if there's no opcode, then I have to write the
> code in PIR. :-)

Err, what about providing a patch for parrot?

> Thanks.

Danke.
leo

0 new messages