jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Boo
  • Boo
  • BOO-426

float literals

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.5.6
  • Fix Version/s: 0.6
  • Component/s: Compiler, Parser
  • Labels:
    None
  • Number of attachments :
    1

Description

Floats are commonly used in game programming and other areas.
This patch adds the use of f or F on numeric literals like C#. Boo already uses the term "single" for this primitive type.

a = 0F
b = 1f
c = 1.0f
d as single = 2.0
print(a.GetType()) //System.Single
print(b.GetType())
print(c.GetType())
print(d.GetType())

It uses float.Parse instead of double.Parse to catch values too big for a float:

//works
zdouble = 1000000000000000000000000000000000000000000000000000.0
//error at compile time, too big for float:
zsingle = 1000000000000000000000000000000000000000000000000000.0f

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    floatliterals.patch
    07/Aug/05 9:38 AM
    9 kB
    Doug H

Issue Links

is depended upon by

New Feature - A new feature of the product, which has yet to be developed. BOO-438 C# and VB parser

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
relates to

Improvement - An improvement or enhancement to an existing feature or task. BOO-459 allow float literals with no decimal point

  • Trivial - Cosmetic problem like misspelt words or misaligned text.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Doug H added a comment - 07/Aug/05 9:38 AM

Made minor fix to jedit syntax files

Show
Doug H added a comment - 07/Aug/05 9:38 AM Made minor fix to jedit syntax files
Hide
Permalink
Rodrigo B. de Oliveira added a comment - 16/Aug/05 7:24 AM

Thanks!

Show
Rodrigo B. de Oliveira added a comment - 16/Aug/05 7:24 AM Thanks!
Hide
Permalink
Doug H added a comment - 24/Aug/05 10:53 AM

Part of patch wasn't applied.

Show
Doug H added a comment - 24/Aug/05 10:53 AM Part of patch wasn't applied.

People

  • Assignee:
    Doug H
    Reporter:
    Doug H
Vote (1)
Watch (0)

Dates

  • Created:
    07/Aug/05 2:13 AM
    Updated:
    24/Aug/05 11:25 PM
    Resolved:
    16/Aug/05 7:24 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.