Re: Literal Values

[email protected] (Jonathan Scott Duff)
Newsgroups perl.perl6.documentation
Message-ID <[email protected]>
On Tue, Nov 12, 2002 at 09:11:24PM +0000, Andrew Wilson wrote:
> For example:
> 
>  my $i = 2:101110;           # binary
>  my $j = 3:1210112;          # tertiary
>  my $k = 8:1270;             # octal
> 
> Printing these would give 46, 1310, and 696 respectively.  

Hmm. As companion to specifying numeric literals in an arbitrary radix,
I'm sure people will want to know how to output numerics in an
arbitrary radix. If perl 6 will have such a facility, a reference to it
should go here too.

-Scott
-- 
Jonathan Scott Duff
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.