Re: Numeric literals, take 1
[email protected] ("Joseph F. Ryan") Sat, 16 Nov 2002 02:55:51 -0500
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
Luke Palmer wrote: >>Mailing-List: contact [email protected]; run by ezmlm >>Date: Fri, 15 Nov 2002 22:11:58 -0500 >>From: Frank Wojcik <[email protected]> >>Content-Disposition: inline >>X-Virus-Scanned: by AMaViS perl-11 >>X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ >> >>On Thu, Nov 14, 2002 at 07:58:55PM +0100, Angel Faus wrote: >> >> >>>The C<1i> and C<-1i> numbers can be also written >>>respectively, C<i> and C<-i>, so the previous example >>>could be rewritten: >>> >>> my $z = 2.3 + i; >>> >>> >>OK. So, what does this print? >> >>sub i {return 40} >> >>my $z = 2.3 + i; >>print "z:$z\n"; >> >> > >Presumably, C<i> is a keyword and it would be an error to say "sub i". > Why would C<i> be a keyword? Its not in perl5, and I don't remember any discussion where non-real numbers would be part of the core language.