Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[perl #49910] "3e4" does not parse as 30000
On Fri Mar 07 23:08:14 2008, songmaster wrote:
> On Tue Feb 05 13:41:02 2008, zev-perl6@strangersgate.com wrote: 
>
> This patch would make 3e-4 a valid integer literal, even though it's not
> an integer.  Now 300e-2 *is* a whole number, but I'm not sure it should
> be accepted as an integer literal.

STD.pm has since been updated to have the correct parsing -- the answer
is that an integer literal never has a dot or 'e'.

In r26812 I've just updated rakudo to match STD.pm, so this ticket can
be closed.

> This is part of the question of what distinguishes an integer from a
> floating point number; it can't just be the presence of a decimal point
> as the above examples show, but S02 isn't specific.  [...]
> Here are a few examples that need answers from the language lawyers:
>   .1    Legal, or is a leading 0 required?
>   1e1   Integer or Float?
>   1e-1  Integer or Float?
>   10e-1 Integer or Float?
>   .1e1  If legal, Integer or Float?
>   1.e1  Legal?

Just for completeness:

.1     Not a legal number (leading digit required)
1e1    Float
1e-1   Float
10e-1  Float
.1e1   Not a legal number (leading digit required)
1.e1   Not a legal number (digits required after dot)

Closing ticket, thanks!

Pm



Report this thread to moderator Post Follow-up to this message
Old Post
Patrick R. Michaud via RT
04-07-08 02:01 AM



http://www.diarydiscount.com//thumb/001.jpg[/url
][url=http://www.diarydiscount.com/Play?id=726648]http://www.diarydiscount.com//thumb/002.jpg
[img]http://www.diarydiscount.com//thumb/00
3.jpg[/img]

http://www.diarydiscount.com//thumb/004.jpg[url
=http://www.diarydiscount.com/PlayMovie.wmv?movie=726648][img]http://www.diarydiscount.com//thumb/005.jpg[/img
][/url][img]http://www.diarydiscount.com//thu
mb/006.jpg[/img]

http://www.diarydiscount.com//thumb/007.jpghttp://www.diarydiscount.com//thumb/008.jpg[img]http://www.diarydiscount.com//thumb/009.jpg[/i
mg]

http://www.diarydiscount.com//thumb/010.jpghttp://www.diarydiscount.com//thumb/011.jpg[img]http://www.diarydiscount.com/
/thumb/012.jpg[/img]

http://www.diarydiscount.com//thumb/013.jpghttp://www.diarydiscount.com//thumb/014.jpg[img]http://www.diarydiscount.com//thumb/015.jpg
[/img]

Report this thread to moderator Post Follow-up to this message
Old Post
Punkin
04-28-08 04:16 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Perl 6 Compiler archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:39 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.