Re: Numeric literals, take 1
[email protected] (Luke Palmer) Fri, 15 Nov 2002 20:17:04 -0700 (MST)
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
> 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". I don't recall complex numbers ever being considered as a builtin type; i.e. non-module. Could someone point me to where this was discussed? (Just, I don't see a general enough usage for them as to make them builtin...) Luke